diff --git a/app/app.go b/app/app.go index c69e14b3..360eea65 100644 --- a/app/app.go +++ b/app/app.go @@ -423,13 +423,10 @@ func New( app.OracleKeeper = oraclekeeper.NewKeeper( appCodec, - keys[oracletypes.ModuleName], - app.GetSubspace(oracletypes.ModuleName), + runtime.NewKVStoreService(app.keys[oracletypes.StoreKey]), app.AccountKeeper, app.BankKeeper, - app.DistrKeeper, app.StakingKeeper, - app.GasEstimateKeeper, distrtypes.ModuleName, cast.ToBool(appOpts.Get("telemetry.enabled")), authtypes.NewModuleAddress(govtypes.ModuleName).String(), diff --git a/app/preblocker.go b/app/preblocker.go index 0df1c144..c0492cc0 100644 --- a/app/preblocker.go +++ b/app/preblocker.go @@ -8,8 +8,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ojo-network/ojo/x/oracle/abci" "github.com/ojo-network/ojo/x/oracle/types" - - gasestimatetypes "github.com/ojo-network/ojo/x/gasestimate/types" ) // PreBlocker is run before finalize block to update the aggregrate exchange rate votes on the oracle module @@ -58,15 +56,8 @@ func (app *App) PreBlocker(ctx sdk.Context, req *cometabci.RequestFinalizeBlock) app.Logger().Error("failed to get voter address", "err", err) continue } - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr, exchangeRateVote) - } - for _, gasEstimate := range injectedVoteExtTx.GasEstimateMedians { - app.GasEstimateKeeper.SetGasEstimate(ctx, gasestimatetypes.GasEstimate{ - Network: gasEstimate.Network, - GasEstimate: gasEstimate.GasEstimation, - }) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr.String(), exchangeRateVote) } - app.Logger().Info("gas estimates updated", "gasestimates", injectedVoteExtTx.GasEstimateMedians) } app.Logger().Info( diff --git a/app/upgrades.go b/app/upgrades.go index bd6737da..a6bf818a 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -36,7 +36,7 @@ func (app App) RegisterUpgradeHandlers() { panic(err) } - app.registerUpgrade0_1_4(upgradeInfo) + // app.registerUpgrade0_1_4(upgradeInfo) app.registerUpgrade0_2_0(upgradeInfo) app.registerUpgrade0_2_1(upgradeInfo) app.registerUpgrade0_2_2(upgradeInfo) @@ -52,22 +52,22 @@ func (app App) RegisterUpgradeHandlers() { app.registerUpgrade0_5_1(upgradeInfo) } -// performs upgrade from v0.1.3 to v0.1.4 -func (app *App) registerUpgrade0_1_4(_ upgradetypes.Plan) { - const planName = "v0.1.4" - app.UpgradeKeeper.SetUpgradeHandler(planName, - func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - sdkCtx.Logger().Info("Upgrade handler execution", "name", planName) - upgrader := oraclekeeper.NewMigrator(&app.OracleKeeper) - err := upgrader.MigrateValidatorSet(sdkCtx) - if err != nil { - panic(err) - } - return app.mm.RunMigrations(ctx, app.configurator, fromVM) - }, - ) -} +// // performs upgrade from v0.1.3 to v0.1.4 +// func (app *App) registerUpgrade0_1_4(_ upgradetypes.Plan) { +// const planName = "v0.1.4" +// app.UpgradeKeeper.SetUpgradeHandler(planName, +// func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { +// sdkCtx := sdk.UnwrapSDKContext(ctx) +// sdkCtx.Logger().Info("Upgrade handler execution", "name", planName) +// upgrader := oraclekeeper.NewMigrator(&app.OracleKeeper) +// err := upgrader.MigrateValidatorSet(sdkCtx) +// if err != nil { +// panic(err) +// } +// return app.mm.RunMigrations(ctx, app.configurator, fromVM) +// }, +// ) +// } //nolint: all func (app *App) registerUpgrade0_2_0(upgradeInfo upgradetypes.Plan) { diff --git a/cmd/ojod/cmd/commands.go b/cmd/ojod/cmd/commands.go index 3b1794c8..54e8f8d8 100644 --- a/cmd/ojod/cmd/commands.go +++ b/cmd/ojod/cmd/commands.go @@ -69,8 +69,8 @@ func initAppConfig() (string, interface{}) { QueryGasLimit: 300000, }, PriceFeeder: pricefeeder.AppConfig{ - ConfigPath: "", - LogLevel: "info", + LogLevel: "info", + Enable: true, }, } @@ -126,9 +126,8 @@ func initRootCmd( ) // add price feeder flags - rootCmd.PersistentFlags().String(pricefeeder.FlagConfigPath, "", "Path to price feeder config file") - rootCmd.PersistentFlags().String(pricefeeder.FlagLogLevel, "", "Log level of price feeder process") - rootCmd.PersistentFlags().Bool(pricefeeder.FlagEnablePriceFeeder, false, "Enable the price feeder") + rootCmd.PersistentFlags().String(pricefeeder.FlagLogLevel, "info", "Log level of price feeder process") + rootCmd.PersistentFlags().Bool(pricefeeder.FlagEnablePriceFeeder, true, "Enable the price feeder") } // genesisCommand builds genesis-related `simd genesis` command. Users may diff --git a/cmd/ojod/cmd/root.go b/cmd/ojod/cmd/root.go index c03c4846..de2e2c45 100644 --- a/cmd/ojod/cmd/root.go +++ b/cmd/ojod/cmd/root.go @@ -8,7 +8,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -85,7 +84,6 @@ up-to-date and accurate data.`, // add keyring to autocli opts autoCliOpts := tempApp.AutoCliOpts() initClientCtx, _ = config.ReadFromClientConfig(initClientCtx) - autoCliOpts.Keyring, _ = keyring.NewAutoCLIKeyring(initClientCtx.Keyring) autoCliOpts.ClientCtx = initClientCtx if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { diff --git a/go.mod b/go.mod index f502e016..984af3e9 100644 --- a/go.mod +++ b/go.mod @@ -4,28 +4,28 @@ go 1.23 require ( cosmossdk.io/api v0.7.6 - cosmossdk.io/client/v2 v2.0.0-beta.1 - cosmossdk.io/core v0.11.0 + cosmossdk.io/client/v2 v2.0.0-beta.3 + cosmossdk.io/core v0.12.0 cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.3.1 - cosmossdk.io/math v1.3.0 - cosmossdk.io/store v1.1.0 - cosmossdk.io/tools/confix v0.1.1 - cosmossdk.io/x/circuit v0.1.0 + cosmossdk.io/log v1.4.1 + cosmossdk.io/math v1.4.0 + cosmossdk.io/store v1.1.1 + cosmossdk.io/tools/confix v0.1.2 + cosmossdk.io/x/circuit v0.1.1 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/feegrant v0.1.1 - cosmossdk.io/x/tx v0.13.3 - cosmossdk.io/x/upgrade v0.1.2 + cosmossdk.io/x/tx v0.13.7 + cosmossdk.io/x/upgrade v0.1.4 github.com/armon/go-metrics v0.4.1 github.com/bufbuild/buf v1.31.0 - github.com/cometbft/cometbft v0.38.7 - github.com/cosmos/cosmos-db v1.0.2 + 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 - github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/cosmos-sdk v0.50.12 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.12 - github.com/cosmos/ibc-go/modules/capability v1.0.0 - github.com/cosmos/ibc-go/v8 v8.2.1 + github.com/cosmos/gogoproto v1.7.0 + github.com/cosmos/ibc-go/modules/capability v1.0.1 + github.com/cosmos/ibc-go/v8 v8.7.0 github.com/ethereum/go-ethereum v1.14.2 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.4 @@ -35,20 +35,20 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/mgechev/revive v1.3.9 github.com/mitchellh/mapstructure v1.5.0 - github.com/ojo-network/ojo-evm/relayer v0.0.0-20240904192312-acda927a5d24 - github.com/ojo-network/price-feeder v0.2.1-rc1 + github.com/ojo-network/price-feeder v0.2.1-rc1.0.20250603135900-b913f8ff0b6b github.com/ory/dockertest/v3 v3.10.0 + github.com/osmosis-labs/osmosis/osmomath v0.0.17 github.com/rs/zerolog v1.33.0 - github.com/spf13/cast v1.6.0 + github.com/spf13/cast v1.7.1 github.com/spf13/cobra v1.8.1 - github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.9.0 - golang.org/x/sync v0.8.0 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.10.0 + golang.org/x/sync v0.10.0 golang.org/x/tools v0.24.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f - google.golang.org/grpc v1.64.1 + google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a + google.golang.org/grpc v1.70.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.34.2 + google.golang.org/protobuf v1.36.4 gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.5.1 mvdan.cc/gofumpt v0.7.0 @@ -61,18 +61,18 @@ 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.0 // 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 connectrpc.com/connect v1.16.1 // indirect connectrpc.com/otelconnect v0.7.0 // indirect cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/depinject v1.1.0 // indirect dario.cat/mergo v1.0.0 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/4meepo/tagalign v1.3.4 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect + github.com/99designs/keyring v1.2.2 // indirect github.com/Abirdcfly/dupword v0.0.14 // indirect github.com/Antonboom/errname v0.1.13 // indirect github.com/Antonboom/nilnil v0.1.9 // indirect @@ -84,8 +84,8 @@ require ( github.com/DataDog/zstd v1.5.5 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Masterminds/semver/v3 v3.3.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/alecthomas/go-check-sumtype v0.1.4 // indirect @@ -105,8 +105,7 @@ require ( github.com/bombsimon/wsl/v4 v4.4.1 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/bufbuild/protocompile v0.9.0 // indirect github.com/bufbuild/protovalidate-go v0.6.2 // indirect github.com/bufbuild/protoyaml-go v0.1.9 // indirect @@ -115,49 +114,48 @@ require ( github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/ckaznocha/intrange v0.1.2 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/pebble v1.1.2 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft-db v0.11.0 // indirect - github.com/containerd/continuity v0.4.1 // indirect + github.com/cometbft/cometbft-db v0.14.1 // indirect + github.com/containerd/continuity v0.4.3 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.1.2 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/cosmos/iavl v1.2.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/creachadair/atomicfile v0.3.1 // indirect - github.com/creachadair/tomledit v0.0.24 // indirect + github.com/creachadair/atomicfile v0.3.3 // indirect + github.com/creachadair/tomledit v0.0.26 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.13.4 // 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.2.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v26.1.0+incompatible // indirect + github.com/docker/cli v26.1.4+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v26.1.0+incompatible // indirect + github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.1 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/emicklei/dot v1.6.1 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/emicklei/dot v1.6.2 // indirect github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/fatih/structtag v1.2.0 // indirect @@ -194,7 +192,7 @@ require ( github.com/gofrs/flock v0.12.1 // indirect github.com/gofrs/uuid/v5 v5.1.0 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.2.0 // 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 @@ -205,8 +203,9 @@ require ( github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/golangci/revgrep v0.5.3 // indirect github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.20.1 // indirect + github.com/google/flatbuffers v2.0.8+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-containerregistry v0.19.1 // indirect github.com/google/orderedcode v0.0.1 // indirect @@ -218,7 +217,7 @@ require ( github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect @@ -234,6 +233,7 @@ require ( github.com/hashicorp/go-safetemp v1.0.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 github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect @@ -255,7 +255,7 @@ require ( github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -268,7 +268,6 @@ require ( github.com/leodido/go-urn v1.2.4 // indirect github.com/leonklingele/grouper v1.1.2 // indirect github.com/lib/pq v1.10.9 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/macabu/inamedparam v0.1.3 // indirect @@ -281,7 +280,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 // indirect - github.com/minio/highwayhash v1.0.2 // indirect + 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/moby/docker-image-spec v1.3.1 // indirect @@ -289,6 +288,7 @@ require ( github.com/moricho/tparallel v0.3.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect @@ -299,18 +299,18 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.12 // indirect + github.com/opencontainers/runc v1.1.14 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.6.0 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.52.2 // indirect - github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/common v0.62.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect @@ -319,7 +319,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.10.1 // indirect + github.com/rs/cors v1.11.1 // indirect github.com/rs/xid v1.5.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.3.3 // indirect @@ -328,7 +328,7 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 // indirect @@ -372,32 +372,32 @@ require ( gitlab.com/bosi/decorder v0.4.2 // indirect go-simpler.org/musttag v0.12.2 // indirect go-simpler.org/sloglint v0.7.2 // indirect - go.etcd.io/bbolt v1.3.8 // 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.26.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.26.0 // indirect + golang.org/x/crypto v0.32.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/mod v0.21.0 // 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/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-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 honnef.co/go/tools v0.5.1 // indirect @@ -408,6 +408,7 @@ require ( ) replace ( + cosmossdk.io/core => cosmossdk.io/core v0.11.1 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index 24b5f2ca..b085b933 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,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.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +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/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= @@ -198,45 +198,45 @@ connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= -cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= -cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= +cosmossdk.io/client/v2 v2.0.0-beta.3 h1:+TTuH0DwQYsUq2JFAl3fDZzKq5gQG7nt3dAattkjFDU= +cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= -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.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +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/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= -cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= -cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= -cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= -cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= -cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= -cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= -cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= -cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +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.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4= +cosmossdk.io/tools/confix v0.1.2/go.mod h1:7XfcbK9sC/KNgVGxgLM0BrFbVcR/+6Dg7MFfpx7duYo= +cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= +cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= -cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= -cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= -cosmossdk.io/x/upgrade v0.1.2 h1:O2FGb0mVSXl7P6BQm9uV3hRVKom1zBLDGhd4G8jysJg= -cosmossdk.io/x/upgrade v0.1.2/go.mod h1:P+e4/ZNd8km7lTAX5hC2pXz/042YDcB7gzKTHuY53nc= +cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= +cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= +cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= @@ -262,13 +262,12 @@ github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5H github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= +github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= @@ -276,8 +275,8 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= +github.com/adlio/schema v1.3.6/go.mod h1:qkxwLgPBd1FgLRHYVCmQT/rrBr3JH38J9LjmVzWNudg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= @@ -302,7 +301,6 @@ github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9 github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= 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/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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= @@ -340,12 +338,12 @@ github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= -github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +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/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/buf v1.31.0 h1:YHLGIr8bjcLaTCIw0+/bCAvJLiR8u46QTwKvn7miSEg= github.com/bufbuild/buf v1.31.0/go.mod h1:LlxpG2LF33f1Ixw29BTt0pyLriLzg3rXY1K9XQVHSio= github.com/bufbuild/protocompile v0.9.0 h1:DI8qLG5PEO0Mu1Oj51YFPqtx6I3qYXUAhJVJ/IzAVl0= @@ -369,7 +367,6 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq 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 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -409,68 +406,69 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= -github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/datadriven v1.0.3-0.20230801171734-e384cf455877 h1:1MLK4YpFtIEo3ZtMA5C795Wtv5VuUnrXX7mQG+aHg6o= +github.com/cockroachdb/datadriven v1.0.3-0.20230801171734-e384cf455877/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= -github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= 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.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk= -github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= -github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= -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/cometbft/cometbft v0.38.17 h1:FkrQNbAjiFqXydeAO81FUzriL4Bz0abYxN/eOHrQGOk= +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.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= 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= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= -github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNCM= +github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= -github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= +github.com/cosmos/cosmos-sdk v0.50.12 h1:WizeD4K74737Gq46/f9fq+WjyZ1cP/1bXwVR3dvyp0g= +github.com/cosmos/cosmos-sdk v0.50.12/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= -github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= -github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= -github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= -github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= -github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= -github.com/cosmos/ibc-go/v8 v8.2.1 h1:MTsnZZjxvGD4Fv5pYyx5UkELafSX0rlPt6IfsE2BpTQ= -github.com/cosmos/ibc-go/v8 v8.2.1/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= +github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= +github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= +github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= +github.com/cosmos/ibc-go/v8 v8.7.0 h1:HqhVOkO8bDpClXE81DFQgFjroQcTvtpm0tCS7SQVKVY= +github.com/cosmos/ibc-go/v8 v8.7.0/go.mod h1:G2z+Q6ZQSMcyHI2+BVcJdvfOupb09M2h/tgpXOEdY6k= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +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 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -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= -github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= +github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= +github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= +github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= +github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce/go.mod h1:okn1ft6DY+qjPmnvYynyq7ufIQKJ2x2qwOCJZecei1k= +github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= +github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= @@ -487,15 +485,14 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 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.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +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/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= 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/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= +github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -504,12 +501,12 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.0+incompatible h1:+nwRy8Ocd8cYNQ60mozDDICICD8aoFGtlPXifX/UQ3Y= -github.com/docker/cli v26.1.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= +github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= -github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -520,14 +517,14 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= -github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= -github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -539,8 +536,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/ethereum/go-ethereum v1.14.2 h1:3ketymsXTLiXmtnCrXab/EUsV+X8KhwUqv572TriDaU= github.com/ethereum/go-ethereum v1.14.2/go.mod h1:1STrq471D0BQbCX9He0hUj4bHxX2k6mt5nOQJhDNOJ8= github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= @@ -680,8 +677,8 @@ github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2 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/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/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= @@ -741,10 +738,12 @@ github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNF github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -834,8 +833,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= @@ -888,8 +887,8 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +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.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -900,6 +899,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -980,10 +981,9 @@ github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LX github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= 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.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1000,6 +1000,8 @@ github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +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/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I= @@ -1016,8 +1018,6 @@ github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84Yrj github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= @@ -1027,7 +1027,6 @@ github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xq github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -1065,8 +1064,8 @@ github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfp github.com/mgechev/revive v1.3.9 h1:18Y3R4a2USSBF+QZKFQwVkBROUda7uoBlkEuBD+YD1A= github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA9UGhHU= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1097,6 +1096,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -1122,10 +1123,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-evm/relayer v0.0.0-20240904192312-acda927a5d24 h1:t0E41HkLJJmyh8rCwNjGQPoHfQSH4QHDTg51UawFKyA= -github.com/ojo-network/ojo-evm/relayer v0.0.0-20240904192312-acda927a5d24/go.mod h1:dW6/pQ+hNtC6955jQUR1cUJrGWcQ6fNEjeSLJCJPz3A= -github.com/ojo-network/price-feeder v0.2.1-rc1 h1:m9vgR9DYuXhM5f2DQX/wewihzkPVAVdVjZgtr/gB6bs= -github.com/ojo-network/price-feeder v0.2.1-rc1/go.mod h1:CSdgh7XiOMLGQwRW8OqbL5FlkE5Mc3+fDZEMRN8JkYY= +github.com/ojo-network/price-feeder v0.2.1-rc1.0.20250603135900-b913f8ff0b6b h1:T4wpeOA49VaPk/DA2tygEnR3eFacJ2qFJgd97hsKmsY= +github.com/ojo-network/price-feeder v0.2.1-rc1.0.20250603135900-b913f8ff0b6b/go.mod h1:/89lZc9UfN1Zi+mUNE89kcfTk70rczz0yDxccPFZTLA= 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= @@ -1151,8 +1150,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= 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/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w= +github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1166,6 +1165,8 @@ github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4 github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= +github.com/osmosis-labs/osmosis/osmomath v0.0.17 h1:H2eqWN3kDI5uCIiDSPjiJZx8wbKj85wIuQqaOAGqurc= +github.com/osmosis-labs/osmosis/osmomath v0.0.17/go.mod h1:PtGEYniKjpdh9mQY57wiH158PLkLJjHBSLo22Fi3dLM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= @@ -1178,13 +1179,11 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= 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 v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 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/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= -github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +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= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -1213,8 +1212,8 @@ 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.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +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_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= @@ -1229,16 +1228,16 @@ 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.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= -github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +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= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 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.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +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/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= @@ -1263,13 +1262,12 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f 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/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +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/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1287,8 +1285,8 @@ github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/ github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI= @@ -1322,26 +1320,18 @@ github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIK github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +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 v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= 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/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/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/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= @@ -1369,8 +1359,9 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO 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 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 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= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -1399,7 +1390,6 @@ github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= @@ -1426,7 +1416,6 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= @@ -1453,8 +1442,8 @@ go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1471,20 +1460,20 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.5 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.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +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/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= -go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +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/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= @@ -1512,7 +1501,6 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1522,8 +1510,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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= 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= @@ -1572,8 +1560,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -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= @@ -1637,8 +1625,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +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/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= @@ -1664,8 +1652,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.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.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= @@ -1681,8 +1669,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ 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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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/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= @@ -1691,8 +1679,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1701,7 +1687,6 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1788,16 +1773,17 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.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.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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/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.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +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/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= @@ -1810,8 +1796,8 @@ 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.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +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/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= @@ -2074,10 +2060,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz 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-20240725223205-93522f1f2a9f h1:b1Ln/PG8orm0SsBbHZWke8dDp2lrCD4jSmfglFpTZbk= -google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +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/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= @@ -2119,8 +2105,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.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +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/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= @@ -2140,8 +2126,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ 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.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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= 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/pricefeeder/config.go b/pricefeeder/config.go index 71007a9d..0092c636 100644 --- a/pricefeeder/config.go +++ b/pricefeeder/config.go @@ -1,8 +1,6 @@ package pricefeeder import ( - "fmt" - servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/spf13/cast" ) @@ -10,37 +8,23 @@ import ( 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 +enable = true ` ) 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 + LogLevel string `mapstructure:"log_level"` + Enable bool `mapstructure:"enable"` } // ReadConfigFromAppOpts reads the config parameters from the AppOptions and returns the config. @@ -50,12 +34,10 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (AppConfig, error) { err error ) - if v := opts.Get(FlagConfigPath); v != nil { - if cfg.ConfigPath, err = cast.ToStringE(v); err != nil { - return cfg, err - } - } + cfg.LogLevel = "info" + cfg.Enable = true + // Override with values from AppOptions if provided if v := opts.Get(FlagLogLevel); v != nil { if cfg.LogLevel, err = cast.ToStringE(v); err != nil { return cfg, err @@ -68,9 +50,5 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (AppConfig, error) { } } - if err := cfg.ValidateBasic(); err != nil { - return cfg, err - } - return cfg, err } diff --git a/pricefeeder/pricefeeder.go b/pricefeeder/pricefeeder.go index 517af572..3703338d 100644 --- a/pricefeeder/pricefeeder.go +++ b/pricefeeder/pricefeeder.go @@ -30,7 +30,34 @@ type PriceFeeder struct { AppConfig AppConfig } -func (pf *PriceFeeder) Start(currentBlockHeight int64, oracleParams types.Params) error { +var cfg = config.Config{ + GasAdjustment: 1, + ProviderTimeout: "1000000s", + Server: config.Server{ + ListenAddr: "0.0.0.0:7171", + ReadTimeout: "20s", + VerboseCORS: true, + WriteTimeout: "20s", + }, + RPC: config.RPC{ + GRPCEndpoint: "localhost:9090", + RPCTimeout: "100ms", + TMRPCEndpoint: "http://localhost:26657", + }, + Telemetry: telemetry.Config{ + EnableHostname: true, + EnableHostnameLabel: true, + EnableServiceLabel: true, + Enabled: true, + GlobalLabels: [][]string{ + {"chain_id", "ojo-testnet"}, + }, + ServiceName: "price-feeder", + PrometheusRetentionTime: 100, + }, +} + +func (pf *PriceFeeder) Start(oracleParams types.Params) error { logWriter := zerolog.ConsoleWriter{Out: os.Stderr} logLevel, err := zerolog.ParseLevel(pf.AppConfig.LogLevel) if err != nil { @@ -38,11 +65,6 @@ func (pf *PriceFeeder) Start(currentBlockHeight int64, oracleParams types.Params } 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) diff --git a/proto/buf.lock b/proto/buf.lock index 373428d3..ab9fb72c 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -8,7 +8,7 @@ deps: - remote: buf.build owner: cosmos repository: cosmos-sdk - commit: 8cb30a2c4de74dc9bd8d260b1e75e176 + commit: 05419252bcc241ea8023acf1ed4cadc5 - remote: buf.build owner: cosmos repository: gogo-proto diff --git a/proto/ojo/oracle/v1/abci.proto b/proto/ojo/oracle/v1/abci.proto index 88605425..1f054eea 100644 --- a/proto/ojo/oracle/v1/abci.proto +++ b/proto/ojo/oracle/v1/abci.proto @@ -4,6 +4,7 @@ package ojo.oracle.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "ojo/oracle/v1/oracle.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/ojo-network/ojo/x/oracle/types"; @@ -17,7 +18,9 @@ message OracleVoteExtension { (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false ]; - repeated GasEstimate gas_estimates = 3 [(gogoproto.nullable) = false]; + repeated ExternalLiquidity external_liquidity = 3 [ + (gogoproto.nullable) = false + ]; } // InjectedVoteExtensionTx defines the vote extension tx injected by the prepare @@ -26,12 +29,31 @@ message InjectedVoteExtensionTx { repeated AggregateExchangeRateVote exchange_rate_votes = 1[ (gogoproto.nullable) = false ]; - bytes extended_commit_info = 2; - repeated GasEstimate gas_estimate_medians = 3 [(gogoproto.nullable) = false]; + repeated ExternalLiquidity external_liquidity = 2 [ + (gogoproto.nullable) = false + ]; + bytes extended_commit_info = 3; +} + +// Elys Asset Amount Depth +message AssetAmountDepth { + string asset = 1; + string amount = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; + string depth = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; } -// GasEstimate defines a gas estimate for a given network. -message GasEstimate { - int64 gas_estimation = 1; - string network = 2; +// ExternalLiquidity defines price, volume, and time information for an exchange +// rate. +message ExternalLiquidity { + uint64 pool_id = 1; + repeated AssetAmountDepth amount_depth_info = 2 + [ (gogoproto.nullable) = false ]; } diff --git a/proto/ojo/oracle/v1/elys.proto b/proto/ojo/oracle/v1/elys.proto new file mode 100644 index 00000000..da9d5332 --- /dev/null +++ b/proto/ojo/oracle/v1/elys.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; +package ojo.oracle.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ojo-network/ojo/x/oracle/types"; + +option (gogoproto.goproto_getters_all) = false; + +// Elys AssetInfo +message AssetInfo { + string denom = 1; + string display = 2; + string ticker = 3; + uint64 decimal = 4; +} + +message LatestPrice { + string denom = 1; + string latest_price = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; + } + +// Elys Price +message Price { + string asset = 1; + string price = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; + string provider = 3; + uint64 timestamp = 4; + uint64 block_height = 5; +} + +// Elys PriceFeeder +message PriceFeeder { + string feeder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + bool is_active = 2; +} + +// Elys Pool +message Pool { + uint64 pool_id = 1; + repeated PoolAsset pool_assets = 2 [ (gogoproto.nullable) = false ]; +} + +// Elys PoolAsset +message PoolAsset { + cosmos.base.v1beta1.Coin token = 1 [ (gogoproto.nullable) = false ]; + string weight = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + string external_liquidity_ratio = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} + +// Elys AccountedPool +message AccountedPool { + uint64 pool_id = 1; + repeated cosmos.base.v1beta1.Coin total_tokens = 2 + [ (gogoproto.nullable) = false ]; +} diff --git a/proto/ojo/oracle/v1/events.proto b/proto/ojo/oracle/v1/events.proto index c02a63cb..eb5ea3fa 100644 --- a/proto/ojo/oracle/v1/events.proto +++ b/proto/ojo/oracle/v1/events.proto @@ -27,3 +27,17 @@ message EventSetFxRate { (gogoproto.nullable) = false ]; } + +// EventSetFxRateVote is emitted on exchange rate vote update +message EventSetFxRateVote { + // uToken denom + string denom = 1; + // Exchange rate (based to USD) + string rate = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; + // Validator address submitting the vote + string validator = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} diff --git a/proto/ojo/oracle/v1/genesis.proto b/proto/ojo/oracle/v1/genesis.proto index 36b27191..d476d3c7 100644 --- a/proto/ojo/oracle/v1/genesis.proto +++ b/proto/ojo/oracle/v1/genesis.proto @@ -3,6 +3,7 @@ package ojo.oracle.v1; import "gogoproto/gogo.proto"; import "ojo/oracle/v1/oracle.proto"; +import "ojo/oracle/v1/elys.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/ojo-network/ojo/x/oracle/types"; @@ -26,6 +27,9 @@ message GenesisState { repeated PriceStamp medians = 7 [ (gogoproto.nullable) = false ]; repeated PriceStamp historic_prices = 8 [ (gogoproto.nullable) = false ]; repeated PriceStamp median_deviations = 9 [ (gogoproto.nullable) = false ]; + repeated AssetInfo asset_infos = 10 [ (gogoproto.nullable) = false ]; + repeated Price prices = 11 [ (gogoproto.nullable) = false ]; + repeated PriceFeeder price_feeders = 12 [ (gogoproto.nullable) = false ]; } // FeederDelegation is the address for where oracle feeder authority are diff --git a/proto/ojo/oracle/v1/oracle.proto b/proto/ojo/oracle/v1/oracle.proto index a47c762a..f0e7b2ff 100644 --- a/proto/ojo/oracle/v1/oracle.proto +++ b/proto/ojo/oracle/v1/oracle.proto @@ -74,6 +74,8 @@ message Params { (gogoproto.castrepeated) = "CurrencyDeviationThresholdList", (gogoproto.nullable) = false ]; + // Number of blocks between updating external liquidity information. + uint64 external_liquidity_period = 16 [ (gogoproto.moretags) = "yaml:\"external_liquidity_period\"" ]; } // Denom - the object to hold configurations of each denom @@ -153,8 +155,13 @@ message CurrencyPairProviders { string base_denom = 1 [ (gogoproto.moretags) = "yaml:\"base_denom\"" ]; string quote_denom = 2 [ (gogoproto.moretags) = "yaml:\"quote_denom\"" ]; - repeated PairAddressProvider pair_address = 3 [ (gogoproto.moretags) = "yaml:\"pair_address\"", (gogoproto.nullable) = false ]; - repeated string providers = 4 [ (gogoproto.moretags) = "yaml:\"providers\"" ]; + string base_proxy_denom = 3 [ (gogoproto.moretags) = "yaml:\"base_proxy_denom\"" ]; + string quote_proxy_denom = 4 [ (gogoproto.moretags) = "yaml:\"quote_proxy_denom\"" ]; + uint64 pool_id = 5 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; + string extern_liquidity_provider = 6 [ (gogoproto.moretags) = "yaml:\"extern_liquidity_provider\"" ]; + string crypto_compare_exchange = 7 [ (gogoproto.moretags) = "yaml:\"crypto_compare_exchange\"" ]; + repeated PairAddressProvider pair_address = 8 [ (gogoproto.moretags) = "yaml:\"pair_address\"", (gogoproto.nullable) = false ]; + repeated string providers = 9 [ (gogoproto.moretags) = "yaml:\"providers\"" ]; } // PairAddressProvider defines the uniswap pair address and provider diff --git a/proto/ojo/oracle/v1/query.proto b/proto/ojo/oracle/v1/query.proto index 061770b6..10b686dc 100644 --- a/proto/ojo/oracle/v1/query.proto +++ b/proto/ojo/oracle/v1/query.proto @@ -4,7 +4,9 @@ package ojo.oracle.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "ojo/oracle/v1/oracle.proto"; +import "ojo/oracle/v1/elys.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/ojo-network/ojo/x/oracle/types"; @@ -97,6 +99,57 @@ service Query { option (google.api.http).get = "/ojo/oracle/v1/valdiators/validator_reward_set"; } + + rpc LatestPrices(QueryLatestPricesRequest) + returns (QueryLatestPricesResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/latest_prices/{denoms}"; + } + + rpc AllLatestPrices(QueryAllLatestPricesRequest) + returns (QueryAllLatestPricesResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/all_latest_prices"; + } + + rpc PriceHistory(QueryPriceHistoryRequest) + returns (QueryPriceHistoryResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/price_history/{asset}"; + } + + // Queries a Pool. + rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/pool/{pool_id}"; + } + + // Queries a list of Pool items. + rpc PoolAll(QueryPoolAllRequest) returns (QueryPoolAllResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/pool"; + } + + // Queries an AccountedPool. + rpc AccountedPool(QueryAccountedPoolRequest) + returns (QueryAccountedPoolResponse) { + option (google.api.http).get = + "/elys-network/elys/oracle/accounted_pool/{pool_id}"; + } + + // Queries a list of AccountedPool items. + rpc AccountedPoolAll(QueryAccountedPoolAllRequest) + returns (QueryAccountedPoolAllResponse) { + option (google.api.http).get = + "/elys-network/elys/oracle/accounted_pool"; + } + + // Queries a AssetInfo by denom. + rpc AssetInfo(QueryAssetInfoRequest) returns (QueryAssetInfoResponse) { + option (google.api.http).get = + "/elys-network/elys/oracle/asset_info/{denom}"; + } + + // Queries a list of AssetInfo items. + rpc AssetInfoAll(QueryAssetInfoAllRequest) + returns (QueryAssetInfoAllResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/asset_info"; + } } // QueryExchangeRates is the request type for the Query/ExchangeRate RPC @@ -291,3 +344,83 @@ message QueryValidatorRewardSet {} message QueryValidatorRewardSetResponse { ValidatorRewardSet validators = 1 [(gogoproto.nullable) = false]; } + +// QueryLatestPricesRequest is the request type for the Query/LatestPrices RPC method. +message QueryLatestPricesRequest { + repeated string denoms = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryLatestPricesResponse is the response type for the Query/LatestPrices RPC method. +message QueryLatestPricesResponse { + repeated LatestPrice prices = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryAllLatestPricesRequest is the request type for the Query/AllLatestPrices RPC method. +message QueryAllLatestPricesRequest {} + +// QueryAllLatestPricesResponse is the response type for the Query/AllLatestPrices RPC method. +message QueryAllLatestPricesResponse { + repeated LatestPrice prices = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryPriceHistoryRequest is the request type for the Query/PriceHistory RPC method. +message QueryPriceHistoryRequest { + string asset = 1; +} + +// QueryPriceHistoryResponse is the response type for the Query/PriceHistory RPC method. +message QueryPriceHistoryResponse { + repeated Price prices = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryPoolRequest is the request type for the Query/PoolRequest RPC method. +message QueryPoolRequest { uint64 pool_id = 1; } + +// QueryPoolResponse is the response type for the Query/PoolResponse RPC method. +message QueryPoolResponse { + Pool pool = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryPoolAllRequest is the request type for the Query/PoolAllRequest RPC method. +message QueryPoolAllRequest {} + +// QueryPoolAllResponse is the response type for the Query/PoolAllResponse RPC method. +message QueryPoolAllResponse { + repeated Pool pool = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryAccountedPoolRequest is the request type for the Query/AccountedPoolRequest RPC method. +message QueryAccountedPoolRequest { uint64 pool_id = 1; } + +// QueryAccountedPoolResponse is the response type for the Query/AccountedPoolResponse RPC method. +message QueryAccountedPoolResponse { + AccountedPool accounted_pool = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryAccountedPoolAllRequest is the request type for the Query/AccountedPoolAllRequest RPC method. +message QueryAccountedPoolAllRequest {} + +// QueryAccountedPoolAllResponse is the response type for the Query/AccountedPoolAllResponse RPC method. +message QueryAccountedPoolAllResponse { + repeated AccountedPool accounted_pool = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryAssetInfoRequest is the request type for the Query/AssetInfoRequest RPC method. +message QueryAssetInfoRequest { string denom = 1; } + +// QueryAssetInfoResponse is the response type for the Query/AssetInfoResponse RPC method. +message QueryAssetInfoResponse { + AssetInfo asset_info = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryAssetInfoAllRequest is the request type for the Query/AssetInfoAllRequest RPC method. +message QueryAssetInfoAllRequest {} + +// QueryAssetInfoAllResponse is the response type for the Query/AssetInfoAllResponse RPC method. +message QueryAssetInfoAllResponse { + repeated AssetInfo asset_info = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/ojo/oracle/v1/tx.proto b/proto/ojo/oracle/v1/tx.proto index 2b0ce848..dec3bf24 100644 --- a/proto/ojo/oracle/v1/tx.proto +++ b/proto/ojo/oracle/v1/tx.proto @@ -12,6 +12,8 @@ option (gogoproto.goproto_getters_all) = false; // Msg defines the oracle Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // AggregateExchangeRatePrevote defines a method for submitting an aggregate // exchange rate prevote. rpc AggregateExchangeRatePrevote(MsgAggregateExchangeRatePrevote) @@ -26,6 +28,38 @@ service Msg { rpc DelegateFeedConsent(MsgDelegateFeedConsent) returns (MsgDelegateFeedConsentResponse); + // FeedPrice defines a method for setting and elys price. + rpc FeedPrice(MsgFeedPrice) + returns (MsgFeedPriceResponse); + + // FeedMultiplePrices defines a method for setting multiple elys prices. + rpc FeedMultiplePrices(MsgFeedMultiplePrices) + returns (MsgFeedMultiplePricesResponse); + + // SetPriceFeeder defines a method for setting an elys price feeder. + rpc SetPriceFeeder(MsgSetPriceFeeder) + returns (MsgSetPriceFeederResponse); + + // DeletePriceFeeder defines a method for deleting an elys price feeder. + rpc DeletePriceFeeder(MsgDeletePriceFeeder) + returns (MsgDeletePriceFeederResponse); + + // RemoveAssetInfo defines a method for removing an elys asset info. + rpc RemoveAssetInfo(MsgRemoveAssetInfo) + returns (MsgRemoveAssetInfoResponse); + + // AddPriceFeeders defines a method for adding elys price feeders. + rpc AddPriceFeeders(MsgAddPriceFeeders) + returns (MsgAddPriceFeedersResponse); + + // RemovePriceFeeders defines a method for removing elys price feeders. + rpc RemovePriceFeeders(MsgRemovePriceFeeders) + returns (MsgRemovePriceFeedersResponse); + + // CreateAssetInfo defines a method for creating elys asset infos. + rpc CreateAssetInfo(MsgCreateAssetInfo) + returns (MsgCreateAssetInfoResponse); + // LegacyGovUpdateParams defines the legacy message that updates the oracle parameters. rpc LegacyGovUpdateParams(MsgLegacyGovUpdateParams) returns (MsgLegacyGovUpdateParamsResponse); @@ -105,6 +139,106 @@ message MsgDelegateFeedConsent { // type. message MsgDelegateFeedConsentResponse {} +// FeedPrice defines a feed price object for feeding an elys price. +message FeedPrice { + string asset = 1; + string price = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} + +// MsgFeedPrice defines a message to feed an elys price. +message MsgFeedPrice { + option (cosmos.msg.v1.signer) = "provider"; + string provider = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + FeedPrice feed_price = 2 [ (gogoproto.nullable) = false ]; +} + +// MsgFeedPriceResponse defines the Msg/FeedPrice response +// type. +message MsgFeedPriceResponse {} + +// MsgSetPriceFeeder defines a message to set an elys price feeder. +message MsgSetPriceFeeder { + option (cosmos.msg.v1.signer) = "feeder"; + string feeder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + bool is_active = 2; +} + +// MsgSetPriceFeederResponse defines the Msg/SetPriceFeederResponse response +// type. +message MsgSetPriceFeederResponse {} + +// MsgDeletePriceFeeder defines a message to delete an elys price feeder. +message MsgDeletePriceFeeder { + option (cosmos.msg.v1.signer) = "feeder"; + string feeder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// MsgDeletePriceFeederResponse defines the Msg/DeleteFeederResponse response +// type. +message MsgDeletePriceFeederResponse {} + +// MsgFeedMultiplePrices defines a message to feed multiple elys prices. +message MsgFeedMultiplePrices { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + repeated FeedPrice feed_prices = 2 [ (gogoproto.nullable) = false ]; +} + +// MsgFeedMultiplePricesResponse defines the Msg/FeedMultiplePrices response +// type. +message MsgFeedMultiplePricesResponse {} + +// MsgRemoveAssetInfo represents a message to remove an elys asset info. +message MsgRemoveAssetInfo { + option (cosmos.msg.v1.signer) = "authority"; + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string denom = 2; +} + +// MsgRemoveAssetInfo defines the Msg/RemoveAssetInfo response +// type. +message MsgRemoveAssetInfoResponse {} + +// MsgAddPriceFeeders represents a message to add elys price feeders. +message MsgAddPriceFeeders { + option (cosmos.msg.v1.signer) = "authority"; + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + repeated string feeders = 2; +} + +// MsgAddPriceFeedersResponse defines the Msg/AddPriceFeeders response +// type. +message MsgAddPriceFeedersResponse {} + +// MsgRemovePriceFeeders represents a message to remove elys price feeders. +message MsgRemovePriceFeeders { + option (cosmos.msg.v1.signer) = "authority"; + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + repeated string feeders = 2; +} + +// MsgRemovePriceFeedersResponse defines the Msg/RemovePriceFeeders response +// type. +message MsgRemovePriceFeedersResponse {} + +// MsgCreateAssetInfo represents a message to create elys asset info. +message MsgCreateAssetInfo { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string denom = 2; + string display = 3; + string ticker = 4; + uint64 decimal = 5; +} + +// MsgCreateAssetInfoResponse defines the Msg/CreateAssetInfo response +// type. +message MsgCreateAssetInfoResponse {} + // MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams request type. message MsgLegacyGovUpdateParams { option (gogoproto.equal) = true; diff --git a/util/int_convert.go b/util/int_convert.go index d822c28b..65045b0e 100644 --- a/util/int_convert.go +++ b/util/int_convert.go @@ -43,3 +43,10 @@ func SafeUint64ToInt64(i uint64) int64 { } return int64(i) } + +func SafeUint64ToInt(i uint64) int { + if i > math.MaxInt { + return math.MaxInt + } + return int(i) +} diff --git a/util/math.go b/util/math.go new file mode 100644 index 00000000..8879148d --- /dev/null +++ b/util/math.go @@ -0,0 +1,48 @@ +package util + +import ( + "github.com/osmosis-labs/osmosis/osmomath" +) + +var pow10Int64Cache = [...]int64{ + 1, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000, + 1000000000, + 10000000000, + 100000000000, + 1000000000000, + 10000000000000, + 100000000000000, + 1000000000000000, + 10000000000000000, + 100000000000000000, + 1000000000000000000, +} + +func Pow10(decimal uint64) osmomath.BigDec { + if decimal <= 18 { + return osmomath.NewBigDec(pow10Int64Cache[decimal]) + } + + // This case less likely to happen + value := osmomath.NewBigDec(1) + for i := 0; i < int(decimal); i++ { + value = value.MulInt64(10) + } + return value +} + +func Pow10Int64(decimal uint64) int64 { + if decimal <= 18 { + return pow10Int64Cache[decimal] + } else { + panic("cannot do more than 10^18 for int64") + } +} diff --git a/util/metrics/metrics.go b/util/metrics/metrics.go index 18e8e689..17f7f53a 100644 --- a/util/metrics/metrics.go +++ b/util/metrics/metrics.go @@ -3,7 +3,6 @@ package metrics import ( "cosmossdk.io/math" "github.com/armon/go-metrics" - sdk "github.com/cosmos/cosmos-sdk/types" ) const ( @@ -14,11 +13,11 @@ const ( ) // RecordMissCounter records the miss counter gauge for a validator -func RecordMissCounter(operator sdk.ValAddress, missCounter uint64) { +func RecordMissCounter(operator string, missCounter uint64) { metrics.SetGaugeWithLabels( []string{missCounterLabel}, float32(missCounter), - []metrics.Label{{Name: "address", Value: operator.String()}}, + []metrics.Label{{Name: "address", Value: operator}}, ) } diff --git a/x/gasestimate/types/gasestimate.pb.go b/x/gasestimate/types/gasestimate.pb.go index f3976235..a4195b37 100644 --- a/x/gasestimate/types/gasestimate.pb.go +++ b/x/gasestimate/types/gasestimate.pb.go @@ -66,7 +66,7 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo -// Contract defines a contract that we +// Contract defines a contract at a specific address and network that we send gasestimate messages to. type Contract struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` diff --git a/x/oracle/GOVERNANCE.md b/x/oracle/GOVERNANCE.md new file mode 100644 index 00000000..363b27db --- /dev/null +++ b/x/oracle/GOVERNANCE.md @@ -0,0 +1,488 @@ +# Oracle Module Governance Operations + +This document provides step-by-step examples for submitting governance proposals related to the Ojo oracle module. These examples cover parameter updates, asset management, and provider management. + +## Table of Contents +- [Understanding Key Types](#understanding-key-types) +- [Updating Oracle Parameters](#updating-oracle-parameters) +- [Managing Assets](#managing-assets) +- [Managing Currency Pair Providers](#managing-currency-pair-providers) +- [Managing Currency Deviation Thresholds](#managing-currency-deviation-thresholds) +- [Canceling Parameter Updates](#canceling-parameter-updates) +- [Submitting Proposals Using JSON Files](#submitting-proposals-using-json-files) + +## Understanding Key Types + +### CurrencyPairProvider Type + +The `CurrencyPairProvider` type defines how price data is sourced for a specific currency pair. It contains the following fields: + +```go +type CurrencyPairProvider struct { + BaseDenom string // The base denomination (e.g., "ATOM", "ETH") + QuoteDenom string // The quote denomination (e.g., "USD", "USDT") + BaseProxyDenom string // Optional proxy denomination for the base asset + QuoteProxyDenom string // Optional proxy denomination for the quote asset + PoolId uint64 // Optional pool ID for liquidity pool based pricing + ExternLiquidityProvider string // External liquidity provider identifier + CryptoCompareExchange string // Optional CryptoCompare exchange identifier + PairAddress []PairAddressProvider // Optional addresses for on-chain DEX pairs + Providers []string // List of authorized price providers +} + +type PairAddressProvider struct { + Address string // The contract address of the DEX pair + AddressProvider string // The provider type (e.g., "eth-uniswap", "eth-curve") +} +``` + +Key points about CurrencyPairProviders: +- Each provider represents a trusted source for price data +- Multiple providers can be specified for redundancy and accuracy +- Proxy denominations allow for indirect price calculations through intermediate assets +- External liquidity providers and pool IDs enable DEX-based pricing +- CryptoCompare integration provides additional price feed options +- PairAddress is used for on-chain DEX price sources +- Common providers include: + - Centralized exchanges (e.g., "binance", "coinbase", "kraken") + - DEXes (e.g., "eth-uniswap", "eth-curve", "osmosis") + +### CurrencyDeviationThreshold Type + +The `CurrencyDeviationThreshold` type defines the maximum allowed price deviation for a specific currency. It contains: + +```go +type CurrencyDeviationThreshold struct { + BaseDenom string // The denomination to monitor (e.g., "ATOM", "ETH") + Threshold string // Maximum allowed deviation as a string decimal (e.g., "0.02" for 2%) +} +``` + +Key points about CurrencyDeviationThresholds: +- Thresholds help prevent price manipulation and ensure oracle reliability +- Values are expressed as string decimals representing percentages (e.g., "0.02" = 2%) +- Different assets may have different thresholds based on their volatility +- Exceeding the threshold may trigger alerts or affect price validity +- Typical threshold values range from 1-2% for stable assets to higher values for volatile assets +- The threshold applies to deviations from the median price across all providers + +### Governance Message Types + +The oracle module provides several governance message types for managing the oracle system: + +#### MsgGovAddDenoms + +Used to add new assets to the oracle system. Contains: +```go +type MsgGovAddDenoms struct { + Authority string // Governance account address + Title string // Proposal title + Description string // Proposal description + Height int64 // Block height for the update + DenomList DenomList // List of denominations to add + Mandatory bool // Whether the assets should be mandatory + RewardBand *cosmossdk_io_math.LegacyDec // Optional reward band for the assets (default value of 2% will be used if not specified) + CurrencyPairProviders CurrencyPairProvidersList // Price providers for the new assets + CurrencyDeviationThresholds CurrencyDeviationThresholdList // Deviation thresholds for the new assets +} +``` + +#### MsgGovUpdateParams + +Used to update oracle parameters. Contains: +```go +type MsgGovUpdateParams struct { + Authority string // Governance account address + Title string // Proposal title + Description string // Proposal description + Plan ParamUpdatePlan // The parameter update plan +} +``` + +#### MsgGovRemoveCurrencyPairProviders + +Used to remove currency pair providers from the oracle. Contains: +```go +type MsgGovRemoveCurrencyPairProviders struct { + Authority string // Governance account address + Title string // Proposal title + Description string // Proposal description + Height int64 // Block height for the update + CurrencyPairProviders CurrencyPairProvidersList // Providers to remove +} +``` + +#### MsgGovRemoveCurrencyDeviationThresholds + +Used to remove currency deviation thresholds. Contains: +```go +type MsgGovRemoveCurrencyDeviationThresholds struct { + Authority string // Governance account address + Title string // Proposal title + Description string // Proposal description + Height int64 // Block height for the update + Currencies []string // List of currency denominations to remove thresholds for +} +``` + +#### MsgGovCancelUpdateParamPlan + +Used to cancel a scheduled parameter update. Contains: +```go +type MsgGovCancelUpdateParamPlan struct { + Authority string // Governance account address + Title string // Proposal title + Description string // Proposal description + Height int64 // Height of the update to cancel +} +``` + +Key points about governance messages: +- All messages require governance authority for execution +- Changes are typically scheduled for a future block height +- Messages include standard proposal metadata (title, description) +- Some operations can be batched (e.g., adding multiple denoms) +- Changes go through the standard governance process with voting + +## Updating Oracle Parameters + +CLI example: +```bash +# Submit a parameter update proposal +ojod tx gov submit-proposal \ + --type=GovUpdateParams \ + --title="Update Oracle Parameters" \ + --description="This proposal updates the vote period and threshold" \ + --authority="ojo1..." \ + --plan.keys="VotePeriod,VoteThreshold" \ + --plan.height=1000000 \ + --plan.changes.vote_period=12 \ + --plan.changes.vote_threshold=0.5 \ + --from= \ + --chain-id= \ + --gas=auto \ + --fees=1000uojo +``` + +## Managing Assets + +### Adding New Assets + +CLI example: +```bash +ojod tx gov submit-proposal \ + --type=GovAddDenoms \ + --title="Add New Assets" \ + --description="Add ATOM and BTC to the oracle" \ + --authority="ojo1..." \ + --height=1000000 \ + --denom-list='[{"base_denom":"uatom","symbol_denom":"ATOM","exponent":6},{"base_denom":"ubtc","symbol_denom":"BTC","exponent":8}]' \ + --mandatory=true \ + --reward-band=0.02 \ + --currency-pair-providers='[{"base_denom":"ATOM","providers":["binance","coinbase","kraken"]},{"base_denom":"BTC","providers":["binance","coinbase","kraken"]}]' \ + --currency-deviation-thresholds='[{"base_denom":"ATOM","threshold":"2"},{"base_denom":"BTC","threshold":"2"}]' \ + --from= \ + --chain-id= \ + --gas=auto \ + --fees=1000uojo +``` + +## Managing Currency Pair Providers + +CLI example: +```bash +ojod tx gov submit-proposal \ + --type=GovRemoveCurrencyPairProviders \ + --title="Remove Currency Pair Provider" \ + --description="Remove Binance as a provider for ATOM" \ + --authority="ojo1..." \ + --height=1000000 \ + --currency-pair-providers='[{"base_denom":"ATOM","providers":["binance"]}]' \ + --from= \ + --chain-id= \ + --gas=auto \ + --fees=1000uojo +``` + +## Managing Currency Deviation Thresholds + +CLI example: +```bash +ojod tx gov submit-proposal \ + --type=GovRemoveCurrencyDeviationThresholds \ + --title="Remove Currency Deviation Thresholds" \ + --description="Remove deviation thresholds for ATOM" \ + --authority="ojo1..." \ + --height=1000000 \ + --currencies=ATOM \ + --from= \ + --chain-id= \ + --gas=auto \ + --fees=1000uojo +``` + +## Canceling Parameter Updates + +CLI example: +```bash +ojod tx gov submit-proposal \ + --type=GovCancelUpdateParamPlan \ + --title="Cancel Parameter Update" \ + --description="Cancel the scheduled parameter update at height 1000000" \ + --authority="ojo1..." \ + --height=1000000 \ + --from= \ + --chain-id= \ + --gas=auto \ + --fees=1000uojo +``` + +## Submitting Proposals Using JSON Files + +For complex proposals, especially those involving multiple messages or detailed configurations, it's recommended to use JSON files. This approach provides better organization and reduces the chance of errors compared to command-line parameters. + +### Basic Command Structure + +```bash +ojod tx gov submit-proposal \ + --from= \ + --chain-id= \ + --gas=auto \ + --fees=1000uojo +``` + +### Real-World Examples + +Here are some example JSON proposal files that demonstrate different oracle governance operations: + +1. Adding New Assets: +```json +{ + "title": "Add ATOM with External Liquidity Configuration", + "summary": "Adds ATOM with external liquidity configuration using Binance as provider", + "messages": [ + { + "@type": "/ojo.oracle.v1.MsgGovAddDenoms", + "authority": "ojo10d07y265gmmuvt4z0w9aw880jnsr700jcz4krc", + "title": "Add ATOM with External Liquidity", + "description": "Adds ATOM with external liquidity configuration using Binance as provider", + "height": 1000000, + "denom_list": [ + { + "base_denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2", + "symbol_denom": "ATOM", + "exponent": 6 + } + ], + "mandatory": true, + "currency_pair_providers": [ + { + "base_denom": "ATOM", + "quote_denom": "USDT", + "base_proxy_denom": "ATOM", + "quote_proxy_denom": "USDC", + "extern_liquidity_provider": "binance", + "pool_id": 1, + "providers": [ + "binance", + "okx", + "bitget", + "gate" + ] + } + ], + "currency_deviation_thresholds": [ + { + "base_denom": "ATOM", + "threshold": "2" + } + ] + } + ], + "metadata": "", + "deposit": "10000000uojo" +} +``` + +Key components: +- Configures ATOM with both direct price feeds and external liquidity sources +- Uses Binance as the external liquidity provider with pool ID 1 +- Sets up proxy denominations for price calculations (ATOM→USDC) +- Includes multiple price providers for redundancy + +2. Updating Currency Pair Providers: +```json +{ + "title": "Updates cpp for RETH", + "summary": "Updates cpp for multi eth provider with uniswap, camelot, balancer, pancake, and curve", + "messages": [ + { + "@type": "/ojo.oracle.v1.MsgGovUpdateParams", + "authority": "ojo10d07y265gmmuvt4z0w9aw880jnsr700jcz4krc", + "title": "Updates cpp for multi eth provider", + "description": "Updates cpp for multi eth provider with uniswap, camelot, balancer, pancake, and curve", + "plan": + { + "keys": [ + "CurrencyPairProviders" + ], + "height": 6843550, + "changes": { + "vote_period": "0", + "vote_threshold": "0.000000000000000000", + "reward_bands": [], + "reward_distribution_window": "0", + "accept_list": [], + "slash_fraction": "0.000000000000000000", + "slash_window": "0", + "min_valid_per_window": "0.000000000000000000", + "mandatory_list": [], + "historic_stamp_period": "0", + "median_stamp_period": "0", + "maximum_price_stamps": "0", + "maximum_median_stamps": "0", + "currency_pair_providers": [ + {"base_denom":"USDT","quote_denom":"USD","pair_address":[],"providers":["kraken","coinbase","crypto","gate"]}, + {"base_denom":"ATOM","quote_denom":"USDT","pair_address":[],"providers":["okx","bitget","gate"]}, + {"base_denom":"ATOM","quote_denom":"USD","pair_address":[],"providers":["kraken"]}, + {"base_denom":"ETH","quote_denom":"USDT","pair_address":[],"providers":["okx","bitget"]}, + {"base_denom":"ETH","quote_denom":"USD","pair_address":[],"providers":["kraken"]}, + {"base_denom":"RETH","quote_denom":"WETH","pair_address":[{"address":"0xa4e0faA58465A2D369aa21B3e42d43374c6F9613","address_provider":"eth-uniswap"}],"providers":["eth-uniswap"]}, + {"base_denom":"WETH","quote_denom":"USDC","pair_address":[{"address":"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640","address_provider":"eth-uniswap"}],"providers":["eth-uniswap"]}, + {"base_denom":"CBETH","quote_denom":"WETH","pair_address":[{"address":"0x840deeef2f115cf50da625f7368c24af6fe74410","address_provider":"eth-uniswap"}],"providers":["eth-uniswap"]}, + {"base_denom":"RE7LRT","quote_denom":"ETH","pair_address":[{"address":"0x4216d5900a6109bba48418b5e2Ab6cc4e61Cf477","address_provider":"eth-balancer"}],"providers":["eth-balancer"]}, + {"base_denom":"SWBTC","quote_denom":"WBTC","pair_address":[],"providers":["eth-pancake", "eth-curve"]} + ] + } + } + } + ], + "metadata": "", + "deposit": "10000000uojo" +} +``` + +3. Removing Assets ([View Full Example](https://gist.github.com/rbajollari/074724ba3911318e439b73f669315caa)): +```json +{ + "title": "Removes STINJ asset", + "summary": "Removes STINJ asset off accept list and mandatory list and removes STINJ currency providers and deviation threshold", + "messages": [ + { + "@type": "/ojo.oracle.v1.MsgGovUpdateParams", + "authority": "ojo10d07y265gmmuvt4z0w9aw880jnsr700jcz4krc", + "title": "Removes STINJ asset on ditto", + "description": "Removes STINJ asset off accept list and mandatory list", + "plan": { + "keys": ["RewardBands", "AcceptList", "MandatoryList"], + "height": 2828500, + "changes": { + // Removed asset configurations + } + } + }, + { + "@type": "/ojo.oracle.v1.MsgGovRemoveCurrencyPairProviders", + "authority": "ojo10d07y265gmmuvt4z0w9aw880jnsr700jcz4krc", + "title": "Removes STINJ currency pair providers", + "description": "Removes STINJ currency pair providers", + "height": 2828500, + "currency_pair_providers": [ + { + "base_denom": "STINJ", + "quote_denom": "INJ", + "pair_address": [], + "providers": ["astroport"] + } + ] + }, + { + "@type": "/ojo.oracle.v1.MsgGovRemoveCurrencyDeviationThresholds", + "authority": "ojo10d07y265gmmuvt4z0w9aw880jnsr700jcz4krc", + "title": "Removes STINJ currency deviation threshold", + "description": "Removes STINJ currency deviation threshold", + "height": 2828500, + "currencies": ["STINJ"] + } + ], + "metadata": "", + "deposit": "10000000uojo" +} +``` + +### Key Components of JSON Proposals + +1. **Message Types**: Each proposal must specify the correct message type in the `@type` field: + - `/ojo.oracle.v1.MsgGovAddDenoms` for adding new assets + - `/ojo.oracle.v1.MsgGovUpdateParams` for updating parameters + - `/ojo.oracle.v1.MsgGovRemoveCurrencyPairProviders` for removing providers + - `/ojo.oracle.v1.MsgGovRemoveCurrencyDeviationThresholds` for removing thresholds + +2. **Authority**: The governance module account address that has the authority to make these changes. + +3. **Height**: The block height at which the changes should take effect. + +4. **Deposit**: The amount of tokens to deposit for the proposal (required for governance). + +### Best Practices for JSON Proposals + +1. **Validation**: Always validate your JSON file before submission: + ```bash + cat proposal.json | jq + ``` + +2. **Multiple Messages**: When removing assets, consider grouping related operations: + - Removing from accept/mandatory lists + - Removing currency pair providers + - Removing deviation thresholds + +3. **Testing**: Test proposals on a testnet first, especially for complex changes. + +4. **Documentation**: Include clear titles and descriptions that explain: + - What changes are being made + - Why the changes are necessary + - Any potential impacts + +5. **Height Planning**: Set appropriate heights that allow enough time for: + - Proposal voting period + - Implementation preparation + - Validator updates + +### Submitting the Proposal + +```bash +# Submit the proposal +ojod tx gov submit-proposal proposal.json \ + --from=validator \ + --chain-id=ojo-1 \ + --gas=auto \ + --fees=1000uojo + +# Check the proposal status +ojod query gov proposal + +# Vote on the proposal (after checking its content) +ojod tx gov vote yes \ + --from=validator \ + --chain-id=ojo-1 \ + --gas=auto \ + --fees=1000uojo +``` + +## Important Notes + +1. All governance proposals require the proper authority address (typically the governance module account). +2. The height parameter specifies when the changes should take effect. +3. For asset additions: + - Make sure to specify both the base and symbol denominations correctly + - Consider whether the asset should be mandatory + - Set appropriate reward bands and deviation thresholds +4. When removing providers or thresholds: + - Verify that alternatives are in place + - Consider the impact on oracle reliability +5. Parameter updates can be scheduled for future blocks and canceled if needed +6. Always verify the proposal contents before submission +7. Follow proper governance procedures including: + - Deposit period + - Voting period + - Required quorum and threshold diff --git a/x/oracle/QUERIES.md b/x/oracle/QUERIES.md new file mode 100644 index 00000000..8ecb64ef --- /dev/null +++ b/x/oracle/QUERIES.md @@ -0,0 +1,330 @@ +# Oracle Module Queries + +This document provides examples and explanations for querying the Ojo oracle module. The oracle module provides various query endpoints to retrieve price data, amm/accounted pool information, and other oracle-related data. + +## Using the CLI + +The oracle module provides several CLI commands for querying data. Here are the main query commands available: + +```bash +# Query all exchange rates +ojod query oracle exchange-rates + +# Query exchange rate for a specific denom +ojod query oracle exchange-rate ATOM + +# Query latest prices for specific denoms +ojod query oracle latest-prices ATOM,BTC,ETH + +# Query all latest prices +ojod query oracle all-latest-prices + +# Query price history for an asset +ojod query oracle price-history ATOM + +# Query oracle parameters +ojod query oracle params + +# Query asset info for a specific denom +ojod query oracle show-asset-info ATOM + +# Query all asset info +ojod query oracle list-asset-info + +# Query a specific pool by ID +ojod query oracle show-pool 1 + +# Query all pools +ojod query oracle list-pool + +# Query a specific accounted pool by ID +ojod query oracle show-accounted-pool 1 + +# Query all accounted pools +ojod query oracle list-accounted-pool +``` + +## Using gRPC + +For programmatic access, you can use the gRPC client. Here are examples in Go showing how to query oracle data: + +```go +package main + +import ( + "context" + "fmt" + "log" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + sdk "github.com/cosmos/cosmos-sdk/types" + oracletypes "github.com/ojo-network/ojo/x/oracle/types" +) + +func main() { + // Connect to your node's gRPC endpoint + grpcConn, err := grpc.Dial( + "localhost:9090", // Your gRPC server address + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + if err != nil { + log.Fatal(err) + } + defer grpcConn.Close() + + // Create oracle query client + queryClient := oracletypes.NewQueryClient(grpcConn) + + // Set timeout context + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) + defer cancel() + + // Example 1: Query Exchange Rates + exchangeRates, err := queryClient.ExchangeRates(ctx, &oracletypes.QueryExchangeRates{}) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Exchange Rates: %v\n", exchangeRates.ExchangeRates) + + // Example 2: Query Active Exchange Rates + activeRates, err := queryClient.ActiveExchangeRates(ctx, &oracletypes.QueryActiveExchangeRates{}) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Active Rates: %v\n", activeRates.ActiveRates) + + // Example 3: Query Latest Prices + latestPrices, err := queryClient.LatestPrices(ctx, &oracletypes.QueryLatestPricesRequest{ + Denoms: []string{"ATOM", "BTC", "ETH"}, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Latest Prices: %v\n", latestPrices) + + // Example 4: Query Price History + priceHistory, err := queryClient.PriceHistory(ctx, &oracletypes.QueryPriceHistoryRequest{ + Asset: "ATOM", + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Price History: %v\n", priceHistory) + + // Example 5: Query Oracle Parameters + params, err := queryClient.Params(ctx, &oracletypes.QueryParams{}) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Oracle Parameters: %v\n", params) + + // Example 6: Query Asset Info + assetInfo, err := queryClient.AssetInfo(ctx, &oracletypes.QueryAssetInfoRequest{ + Denom: "ATOM", + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Asset Info: %v\n", assetInfo) + + // Example 7: Query All Asset Info + allAssetInfo, err := queryClient.AssetInfoAll(ctx, &oracletypes.QueryAssetInfoAllRequest{}) + if err != nil { + log.Fatal(err) + } + fmt.Printf("All Asset Info: %v\n", allAssetInfo) + + // Example 8: Query a specific pool + pool, err := queryClient.Pool(ctx, &oracletypes.QueryPoolRequest{ + PoolId: 1, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Pool: %v\n", pool) + + // Example 9: Query all pools + allPools, err := queryClient.PoolAll(ctx, &oracletypes.QueryPoolAllRequest{}) + if err != nil { + log.Fatal(err) + } + fmt.Printf("All Pools: %v\n", allPools) + + // Example 10: Query a specific accounted pool + accountedPool, err := queryClient.AccountedPool(ctx, &oracletypes.QueryAccountedPoolRequest{ + PoolId: 1, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Accounted Pool: %v\n", accountedPool) + + // Example 11: Query all accounted pools + allAccountedPools, err := queryClient.AccountedPoolAll(ctx, &oracletypes.QueryAccountedPoolAllRequest{}) + if err != nil { + log.Fatal(err) + } + fmt.Printf("All Accounted Pools: %v\n", allAccountedPools) +} +``` + +## REST API Endpoints + +The oracle module also exposes REST API endpoints through the gRPC-gateway. Here are the available endpoints: + +``` +# Get exchange rates +GET /ojo/oracle/v1/denoms/exchange_rates/{denom} + +# Get active exchange rates +GET /ojo/oracle/v1/denoms/active_exchange_rates + +# Get oracle parameters +GET /ojo/oracle/v1/params + +# Get medians for all denoms or a specific denom +GET /ojo/historacle/v1/denoms/medians + +# Get median deviations for all denoms or a specific denom +GET /ojo/historacle/v1/denoms/median_deviations + +# Get latest prices for specific denoms +GET /elys-network/elys/oracle/latest_prices/{denoms} + +# Get all latest prices +GET /elys-network/elys/oracle/all_latest_prices + +# Get price history for an asset +GET /elys-network/elys/oracle/price_history/{asset} + +# Get pool by ID +GET /elys-network/elys/oracle/pool/{pool_id} + +# Get all pools +GET /elys-network/elys/oracle/pool + +# Get accounted pool by ID +GET /elys-network/elys/oracle/accounted_pool/{pool_id} + +# Get all accounted pools +GET /elys-network/elys/oracle/accounted_pool + +# Get asset info for a specific denom +GET /elys-network/elys/oracle/asset_info/{denom} + +# Get all asset info +GET /elys-network/elys/oracle/asset_info +``` + +## Response Types + +Here are the main response types you'll receive from the queries: + +### Exchange Rates Response +```go +type QueryExchangeRatesResponse struct { + // exchange_rates defines a list of the exchange rate for all whitelisted denoms + ExchangeRates []sdk.DecCoin +} +``` + +### Latest Prices Response +```go +type QueryLatestPricesResponse struct { + Prices []types.LatestPrice + Pagination *query.PageResponse +} + +type LatestPrice struct { + Denom string + LatestPrice sdk.Dec +} +``` + +### Price History Response +```go +type QueryPriceHistoryResponse struct { + Prices []types.Price + Pagination *query.PageResponse +} + +type Price struct { + Asset string + Price sdk.Dec + Timestamp uint64 +} +``` + +### Parameters Response +```go +type QueryParamsResponse struct { + // params defines the parameters of the module + Params types.Params +} +``` + +### Asset Info Response +```go +type QueryAssetInfoResponse struct { + AssetInfo types.AssetInfo +} + +type AssetInfo struct { + Denom string + Display string + Ticker string + Decimal uint64 +} +``` + +### All Asset Info Response +```go +type QueryAssetInfoAllResponse struct { + AssetInfo []types.AssetInfo +} +``` + +### Pool Response +```go +type QueryPoolResponse struct { + Pool Pool +} + +type Pool struct { + PoolId uint64 + PoolAssets []PoolAsset +} + +type PoolAsset struct { + Token sdk.Coin + Weight math.Int + ExternalLiquidityRatio math.LegacyDec +} +``` + +### Accounted Pool Response +```go +type QueryAccountedPoolResponse struct { + AccountedPool AccountedPool +} + +type AccountedPool struct { + PoolId uint64 + TotalTokens []sdk.Coin +} +``` + +## Error Handling + +When using the gRPC client, be sure to check for errors in the responses. Common error scenarios include: + +- Network connectivity issues +- Invalid validator addresses +- Non-existent denoms or pool IDs +- Rate limiting +- Timeout errors + +Always implement proper error handling in your applications when querying the oracle module. diff --git a/x/oracle/abci/endblocker.go b/x/oracle/abci/endblocker.go index 00c59f4b..b14127a8 100644 --- a/x/oracle/abci/endblocker.go +++ b/x/oracle/abci/endblocker.go @@ -35,30 +35,54 @@ func EndBlocker(ctx context.Context, k keeper.Keeper) error { // 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) + err := k.PriceFeeder.Start(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) { + usdcDenom := "uusdc" + assetInfos := k.GetAllAssetInfo(sdkCtx) + for _, assetInfo := range assetInfos { + if assetInfo.Display == "USDC" { + usdcDenom = assetInfo.Denom + } + k.PruneElysPrices(sdkCtx, assetInfo.Display) } - } - 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) + ammPools := k.GetAllPool(sdkCtx) + ammPoolsMap := make(map[uint64]types.Pool) + for _, pool := range ammPools { + ammPoolsMap[pool.PoolId] = pool + } + + accountedPools := k.GetAllAccountedPool(sdkCtx) + accountedPoolsMap := make(map[uint64]types.AccountedPool) + for _, accountedPool := range accountedPools { + accountedPoolsMap[accountedPool.PoolId] = accountedPool + } + + k.PriceFeeder.Oracle.AmmPools = ammPoolsMap + k.PriceFeeder.Oracle.AccountedPools = accountedPoolsMap + k.PriceFeeder.Oracle.USDCDenom = usdcDenom + // 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) } + + // Execute price feeder external liquidity tick + if k.IsPeriodLastBlock(sdkCtx, params.ExternalLiquidityPeriod) { + if err := k.PriceFeeder.Oracle.TickExternalLiquidityClientless(ctx); err != nil { + sdkCtx.Logger().Error("Error in Oracle Keeper price feeder clientless external liquidity tick", "err", err) + } + } } // Update oracle module with prices. @@ -67,12 +91,6 @@ func EndBlocker(ctx context.Context, k keeper.Keeper) error { } } - // 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 } @@ -84,23 +102,14 @@ func CalcPrices(ctx sdk.Context, params types.Params, k keeper.Keeper) error { var totalBondedPower int64 vals, err := k.StakingKeeper.GetBondedValidatorsByPower(ctx) if err != nil { - return err + ctx.Logger().Warn("Failed to get validator set in oracle endblocker", "err", err) + return nil } + 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) + validatorClaimMap[v.GetOperator()] = types.NewClaim(power, 0, 0, v.GetOperator()) } k.ClearExchangeRates(ctx) @@ -145,43 +154,17 @@ func CalcPrices(ctx sdk.Context, params types.Params, k keeper.Keeper) error { 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 - } + // Set elys price + elysPrice := types.Price{ + Asset: ballotDenom.Denom, + Price: exchangeRate, + Provider: "automation", + Timestamp: util.SafeInt64ToUint64(ctx.BlockTime().Unix()), + BlockHeight: util.SafeInt64ToUint64(ctx.BlockHeight()), } + k.SetPrice(ctx, elysPrice) } - // 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 @@ -216,7 +199,7 @@ func Tally( tallyVote.ExchangeRate.LTE(weightedMedian.Add(rewardSpread))) || !tallyVote.ExchangeRate.IsPositive() { - key := tallyVote.Voter.String() + key := tallyVote.Voter claim := validatorClaimMap[key] if incrementWin { diff --git a/x/oracle/abci/endblocker_test.go b/x/oracle/abci/endblocker_test.go index b5d1a217..ac418144 100644 --- a/x/oracle/abci/endblocker_test.go +++ b/x/oracle/abci/endblocker_test.go @@ -1,10 +1,12 @@ package abci_test import ( + "time" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/osmosis-labs/osmosis/osmomath" - appparams "github.com/ojo-network/ojo/app/params" "github.com/ojo-network/ojo/util/decmath" "github.com/ojo-network/ojo/x/oracle/abci" "github.com/ojo-network/ojo/x/oracle/types" @@ -26,7 +28,11 @@ func createVotes(hash string, val sdk.ValAddress, rates sdk.DecCoins, blockHeigh func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { app, ctx := s.app, s.ctx valAddr1, valAddr2, valAddr3 := s.keys[0].ValAddress, s.keys[1].ValAddress, s.keys[2].ValAddress + currTime := time.Now() + timeDiff := time.Second * 5 ctx = ctx.WithBlockHeight(0) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) preVoteBlockDiff := int64(app.OracleKeeper.VotePeriod(ctx) / 2) voteBlockDiff := int64(app.OracleKeeper.VotePeriod(ctx)/2 + 1) @@ -71,9 +77,11 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { abci.EndBlocker(ctx, app.OracleKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1, val1Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3, val3Votes) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1.String(), val1Votes) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2.String(), val2Votes) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3.String(), val3Votes) err := abci.EndBlocker(ctx, app.OracleKeeper) s.Require().NoError(err) @@ -81,12 +89,18 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { rate, err := app.OracleKeeper.GetExchangeRate(ctx, denom.SymbolDenom) s.Require().NoError(err) s.Require().Equal(math.LegacyMustNewDecFromStr("1.0"), rate) + + elysPrice, found := app.OracleKeeper.GetAssetPrice(ctx, denom.SymbolDenom) + s.Require().True(found) + s.Require().Equal(elysPrice, osmomath.BigDecFromDec(rate)) } // Test: only val2 votes (has 39% vote power). // Total voting power per denom must be bigger or equal than 40% (see SetupTest). // So if only val2 votes, we won't have any prices next block. ctx = ctx.WithBlockHeight(ctx.BlockHeight() + preVoteBlockDiff) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) h = uint64(ctx.BlockHeight()) val2PreVotes.SubmitBlock = h @@ -94,7 +108,9 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { abci.EndBlocker(ctx, app.OracleKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2.String(), val2Votes) abci.EndBlocker(ctx, app.OracleKeeper) for _, denom := range app.OracleKeeper.AcceptList(ctx) { @@ -106,6 +122,8 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { // Test: val2 and val3 votes. // now we will have 40% of the power, so now we should have prices ctx = ctx.WithBlockHeight(ctx.BlockHeight() + preVoteBlockDiff) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) h = uint64(ctx.BlockHeight()) val2PreVotes.SubmitBlock = h val3PreVotes.SubmitBlock = h @@ -115,19 +133,27 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { abci.EndBlocker(ctx, app.OracleKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3, val3Votes) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2.String(), val2Votes) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3.String(), val3Votes) abci.EndBlocker(ctx, app.OracleKeeper) for _, denom := range app.OracleKeeper.AcceptList(ctx) { rate, err := app.OracleKeeper.GetExchangeRate(ctx, denom.SymbolDenom) s.Require().NoError(err) s.Require().Equal(math.LegacyMustNewDecFromStr("0.5"), rate) + + elysPrice, found := app.OracleKeeper.GetAssetPrice(ctx, denom.SymbolDenom) + s.Require().True(found) + s.Require().Equal(elysPrice, osmomath.BigDecFromDec(rate)) } // Test: val1 and val2 vote again // umee has 69.9% power, and atom has 30%, so we should have price for umee, but not for atom ctx = ctx.WithBlockHeight(ctx.BlockHeight() + preVoteBlockDiff) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) h = uint64(ctx.BlockHeight()) val1PreVotes.SubmitBlock = h val2PreVotes.SubmitBlock = h @@ -144,181 +170,25 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { abci.EndBlocker(ctx, app.OracleKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1, val1Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) + ctx = ctx.WithBlockTime(currTime) + currTime = currTime.Add(timeDiff) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1.String(), val1Votes) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2.String(), val2Votes) abci.EndBlocker(ctx, app.OracleKeeper) rate, err := app.OracleKeeper.GetExchangeRate(ctx, "ojo") s.Require().NoError(err) s.Require().Equal(math.LegacyMustNewDecFromStr("1.0"), rate) + + elysPrice, found := app.OracleKeeper.GetAssetPrice(ctx, "ojo") + s.Require().True(found) + s.Require().Equal(elysPrice, osmomath.BigDecFromDec(rate)) + rate, err = app.OracleKeeper.GetExchangeRate(ctx, "atom") s.Require().ErrorIs(err, types.ErrUnknownDenom.Wrap("atom")) s.Require().Equal(math.LegacyZeroDec(), rate) } -func (s *IntegrationTestSuite) TestEndBlockerValidatorRewards() { - app, ctx := s.app, s.ctx - valAddr1, valAddr2, valAddr3 := s.keys[0].ValAddress, s.keys[1].ValAddress, s.keys[2].ValAddress - preVoteBlockDiff := int64(app.OracleKeeper.VotePeriod(ctx) / 2) - voteBlockDiff := int64(app.OracleKeeper.VotePeriod(ctx)/2 + 1) - - // start test in new slash window - ctx = ctx.WithBlockHeight(int64(app.OracleKeeper.SlashWindow(ctx))) - abci.EndBlocker(ctx, app.OracleKeeper) - - denomList := types.DenomList{ - { - BaseDenom: appparams.BondDenom, - SymbolDenom: appparams.DisplayDenom, - Exponent: uint32(6), - }, - { - BaseDenom: "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", - SymbolDenom: "atom", - Exponent: uint32(6), - }, - } - app.OracleKeeper.SetAcceptList(ctx, denomList) - app.OracleKeeper.SetMandatoryList(ctx, denomList) - - var ( - val1DecCoins sdk.DecCoins - val2DecCoins sdk.DecCoins - val3DecCoins sdk.DecCoins - ) - for _, denom := range app.OracleKeeper.AcceptList(ctx) { - val1DecCoins = append(val1DecCoins, sdk.DecCoin{ - Denom: denom.SymbolDenom, - Amount: math.LegacyMustNewDecFromStr("0.6"), - }) - val2DecCoins = append(val2DecCoins, sdk.DecCoin{ - Denom: denom.SymbolDenom, - Amount: math.LegacyMustNewDecFromStr("0.6"), - }) - val3DecCoins = append(val3DecCoins, sdk.DecCoin{ - Denom: denom.SymbolDenom, - Amount: math.LegacyMustNewDecFromStr("0.6"), - }) - } - - h := uint64(ctx.BlockHeight()) - val1PreVotes, val1Votes := createVotes("hash1", valAddr1, val1DecCoins, h) - val2PreVotes, val2Votes := createVotes("hash2", valAddr2, val2DecCoins, h) - val3PreVotes, val3Votes := createVotes("hash3", valAddr3, val3DecCoins, h) - // validator 1, 2, and 3 vote on both currencies so all have 0 misses - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr1, val1PreVotes) - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr2, val2PreVotes) - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr3, val3PreVotes) - abci.EndBlocker(ctx, app.OracleKeeper) - - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1, val1Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3, val3Votes) - abci.EndBlocker(ctx, app.OracleKeeper) - - currRewards1, err := app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr1) - s.Require().NoError(err) - currRewards2, err := app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr2) - s.Require().NoError(err) - currRewards3, err := app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr3) - s.Require().NoError(err) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 141), currRewards1.Rewards[0]) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 141), currRewards2.Rewards[0]) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 141), currRewards3.Rewards[0]) - - // update prevotes' block - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + preVoteBlockDiff) - val1PreVotes.SubmitBlock = uint64(ctx.BlockHeight()) - val2PreVotes.SubmitBlock = uint64(ctx.BlockHeight()) - val3PreVotes.SubmitBlock = uint64(ctx.BlockHeight()) - - // validator 1 and 3 votes on both currencies to end up with 0 misses - // validator 2 votes on 1 currency to end up with 1 misses - val1DecCoins = sdk.DecCoins{ - sdk.DecCoin{ - Denom: "ojo", - Amount: math.LegacyMustNewDecFromStr("0.6"), - }, - sdk.DecCoin{ - Denom: "atom", - Amount: math.LegacyMustNewDecFromStr("0.6"), - }, - } - val2DecCoins = sdk.DecCoins{ - sdk.DecCoin{ - Denom: "ojo", - Amount: math.LegacyMustNewDecFromStr("0.6"), - }, - } - val3DecCoins = sdk.DecCoins{ - sdk.DecCoin{ - Denom: "ojo", - Amount: math.LegacyMustNewDecFromStr("0.6"), - }, - sdk.DecCoin{ - Denom: "atom", - Amount: math.LegacyMustNewDecFromStr("0.6"), - }, - } - val1Votes.ExchangeRates = val1DecCoins - val2Votes.ExchangeRates = val2DecCoins - val3Votes.ExchangeRates = val3DecCoins - - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr1, val1PreVotes) - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr2, val2PreVotes) - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr3, val3PreVotes) - abci.EndBlocker(ctx, app.OracleKeeper) - - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1, val1Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3, val3Votes) - abci.EndBlocker(ctx, app.OracleKeeper) - - currRewards1, err = app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr1) - s.Require().NoError(err) - currRewards2, err = app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr2) - s.Require().NoError(err) - currRewards3, err = app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr3) - s.Require().NoError(err) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 235), currRewards1.Rewards[0]) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 232), currRewards2.Rewards[0]) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 235), currRewards3.Rewards[0]) - - // update prevotes' block - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + preVoteBlockDiff) - val1PreVotes.SubmitBlock = uint64(ctx.BlockHeight()) - val2PreVotes.SubmitBlock = uint64(ctx.BlockHeight()) - - // validator 1, 2, and 3 miss both currencies so validator 1 and 3 has 2 misses and - // validator 2 has 3 misses - val1Votes.ExchangeRates = sdk.DecCoins{} - val2Votes.ExchangeRates = sdk.DecCoins{} - val3Votes.ExchangeRates = sdk.DecCoins{} - - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr1, val1PreVotes) - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr2, val2PreVotes) - app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr3, val3PreVotes) - abci.EndBlocker(ctx, app.OracleKeeper) - - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + voteBlockDiff) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1, val1Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr2, val2Votes) - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr3, val3Votes) - abci.EndBlocker(ctx, app.OracleKeeper) - - currRewards1, err = app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr1) - s.Require().NoError(err) - currRewards2, err = app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr2) - s.Require().NoError(err) - currRewards3, err = app.DistrKeeper.GetValidatorCurrentRewards(ctx, valAddr3) - s.Require().NoError(err) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 329), currRewards1.Rewards[0]) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 320), currRewards2.Rewards[0]) - s.Require().Equal(sdk.NewInt64DecCoin("uojo", 329), currRewards3.Rewards[0]) -} - var exchangeRates = map[string][]math.LegacyDec{ "ATOM": { math.LegacyMustNewDecFromStr("12.99"), @@ -372,7 +242,7 @@ func (s *IntegrationTestSuite) TestEndblockerHistoracle() { ExchangeRates: decCoins, Voter: valAddr1.String(), } - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1, vote) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr1.String(), vote) abci.EndBlocker(ctx, app.OracleKeeper) } diff --git a/x/oracle/abci/proposal.go b/x/oracle/abci/proposal.go index 5bc1db7c..5c65a7d2 100644 --- a/x/oracle/abci/proposal.go +++ b/x/oracle/abci/proposal.go @@ -9,27 +9,26 @@ import ( 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/ojo-network/ojo/x/oracle/keeper" oracletypes "github.com/ojo-network/ojo/x/oracle/types" ) type ProposalHandler struct { - logger log.Logger - oracleKeeper oraclekeeper.Keeper - stakingKeeper *stakingkeeper.Keeper + logger log.Logger + oracleKeeper oraclekeeper.Keeper + valStore baseapp.ValidatorStore } func NewProposalHandler( logger log.Logger, oracleKeeper oraclekeeper.Keeper, - stakingKeeper *stakingkeeper.Keeper, + valStore baseapp.ValidatorStore, ) *ProposalHandler { return &ProposalHandler{ - logger: logger, - oracleKeeper: oracleKeeper, - stakingKeeper: stakingKeeper, + logger: logger, + oracleKeeper: oracleKeeper, + valStore: valStore, } } @@ -46,7 +45,7 @@ func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { return nil, err } - err := baseapp.ValidateVoteExtensions(ctx, h.stakingKeeper, req.Height, ctx.ChainID(), req.LocalLastCommit) + err := baseapp.ValidateVoteExtensions(ctx, h.valStore, req.Height, ctx.ChainID(), req.LocalLastCommit) if err != nil { return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err } @@ -68,19 +67,19 @@ func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { if err != nil { return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err } - extendedCommitInfoBz, err := req.LocalLastCommit.Marshal() + externalLiquidty, err := h.generateExternalLiquidity(ctx, req.LocalLastCommit) if err != nil { return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err } - - medianGasEstimates, err := h.generateMedianGasEstimates(ctx, req.LocalLastCommit) + extendedCommitInfoBz, err := req.LocalLastCommit.Marshal() if err != nil { return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err } + injectedVoteExtTx := oracletypes.InjectedVoteExtensionTx{ ExchangeRateVotes: exchangeRateVotes, + ExternalLiquidity: externalLiquidty, ExtendedCommitInfo: extendedCommitInfoBz, - GasEstimateMedians: medianGasEstimates, } bz, err := injectedVoteExtTx.Marshal() @@ -111,6 +110,17 @@ func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { // step MUST be deterministic. func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { return func(ctx sdk.Context, req *cometabci.RequestProcessProposal) (*cometabci.ResponseProcessProposal, error) { + // Skip vote extension verification during initial sync + // This significantly speeds up sync time as nodes don't need to verify + // historical vote extensions + if req.Height > 0 && ctx.BlockHeight() < req.Height-1 { + h.logger.Debug( + "skipping vote extension verification during sync", + "current_height", ctx.BlockHeight(), + "proposal_height", req.Height, + ) + return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_ACCEPT}, nil + } if req == nil { err := fmt.Errorf("process proposal received a nil request") h.logger.Error(err.Error()) @@ -128,6 +138,28 @@ func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { voteExtensionsEnabled := VoteExtensionsEnabled(ctx) if voteExtensionsEnabled { + // Add resilience: if we're having trouble reaching consensus, + // be more lenient with vote extension requirements + if len(req.ProposedLastCommit.Votes) > 0 { + // Count voting power to detect edge cases + votingPowerSeen := 0 + for _, vote := range req.ProposedLastCommit.Votes { + if vote.BlockIdFlag == cmtproto.BlockIDFlagCommit { + votingPowerSeen++ + } + } + // If we're seeing minimal voting power, be lenient + if votingPowerSeen <= len(req.ProposedLastCommit.Votes)/2 { + h.logger.Warn( + "low voting power detected, accepting proposal without strict validation", + "height", req.Height, + "voting_power_seen", votingPowerSeen, + "total_votes", len(req.ProposedLastCommit.Votes), + ) + return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_ACCEPT}, nil + } + } + if len(req.Txs) < 1 { h.logger.Error("got process proposal request with no commit info") return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_REJECT}, @@ -158,7 +190,7 @@ func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { err := baseapp.ValidateVoteExtensions( ctx, - h.stakingKeeper, + h.valStore, req.Height, ctx.ChainID(), extendedCommitInfo, @@ -176,12 +208,13 @@ func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { if err := h.verifyExchangeRateVotes(injectedVoteExtTx.ExchangeRateVotes, exchangeRateVotes); err != nil { return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_REJECT}, err } - // Verify the proposer's gas estimation by computing the same median. - gasEstimateMedians, err := h.generateMedianGasEstimates(ctx, extendedCommitInfo) + + // Verify the proposer's external liquidity by computing the same. + externalLiquidity, err := h.generateExternalLiquidity(ctx, extendedCommitInfo) if err != nil { return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_REJECT}, err } - if err := h.verifyMedianGasEstimations(injectedVoteExtTx.GasEstimateMedians, gasEstimateMedians); err != nil { + if err := h.verifyExternalLiquidity(injectedVoteExtTx.ExternalLiquidity, externalLiquidity); err != nil { return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_REJECT}, err } } @@ -197,14 +230,33 @@ func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { } func (h *ProposalHandler) generateExchangeRateVotes( - ctx sdk.Context, + _ sdk.Context, ci cometabci.ExtendedCommitInfo, ) (votes []oracletypes.AggregateExchangeRateVote, err error) { + emptyExtensionCount := 0 + totalExtensions := 0 + for _, vote := range ci.Votes { if vote.BlockIdFlag != cmtproto.BlockIDFlagCommit { continue } + totalExtensions++ + + // Track empty vote extensions + if len(vote.VoteExtension) == 0 { + emptyExtensionCount++ + + var valConsAddr sdk.ConsAddress + if err := valConsAddr.Unmarshal(vote.Validator.Address); err == nil { + h.logger.Debug( + "validator submitted empty vote extension", + "validator", valConsAddr.String(), + ) + } + continue + } + var voteExt oracletypes.OracleVoteExtension if err := voteExt.Unmarshal(vote.VoteExtension); err != nil { h.logger.Error( @@ -222,20 +274,8 @@ func (h *ProposalHandler) generateExchangeRateVotes( ) 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) + exchangeRateVote := oracletypes.NewAggregateExchangeRateVote(voteExt.ExchangeRates, valConsAddr.String()) votes = append(votes, exchangeRateVote) } @@ -244,6 +284,17 @@ func (h *ProposalHandler) generateExchangeRateVotes( return votes[i].Voter < votes[j].Voter }) + // Log metrics about empty extensions + if emptyExtensionCount > 0 { + h.logger.Info( + "vote extensions summary", + "total_validators", totalExtensions, + "empty_extensions", emptyExtensionCount, + "valid_extensions", len(votes), + "empty_percentage", fmt.Sprintf("%.2f%%", float64(emptyExtensionCount)/float64(totalExtensions)*100), + ) + } + return votes, nil } @@ -260,6 +311,10 @@ func (h *ProposalHandler) verifyExchangeRateVotes( generatedVote := generatedVotes[i] if injectedVote.Voter != generatedVote.Voter || !injectedVote.ExchangeRates.Equal(generatedVote.ExchangeRates) { + h.logger.Info("injected", "voter %s", injectedVote.Voter) + h.logger.Info("generated", "voter %s", generatedVote.Voter) + h.logger.Info("injected", "voter %+v", injectedVote.ExchangeRates) + h.logger.Info("injected", "voter %+v", generatedVote.ExchangeRates) return oracletypes.ErrNonEqualInjVotesRates } } @@ -267,95 +322,90 @@ func (h *ProposalHandler) verifyExchangeRateVotes( return nil } -func (h *ProposalHandler) generateMedianGasEstimates( - ctx sdk.Context, +func (h *ProposalHandler) generateExternalLiquidity( + _ sdk.Context, ci cometabci.ExtendedCommitInfo, -) ([]oracletypes.GasEstimate, error) { - gasEstimates := []oracletypes.GasEstimate{} - +) (externalLiquidityList []oracletypes.ExternalLiquidity, err error) { for _, vote := range ci.Votes { if vote.BlockIdFlag != cmtproto.BlockIDFlagCommit { continue } - var valConsAddr sdk.ConsAddress - if err := valConsAddr.Unmarshal(vote.Validator.Address); err != nil { + var voteExt oracletypes.OracleVoteExtension + if err := voteExt.Unmarshal(vote.VoteExtension); err != nil { h.logger.Error( - "failed to unmarshal validator consensus address", + "failed to decode vote extension", "err", err, ) - return gasEstimates, err + return nil, err } - val, err := h.stakingKeeper.GetValidatorByConsAddr(ctx, valConsAddr) - if err != nil { + + var valConsAddr sdk.ConsAddress + if err := valConsAddr.Unmarshal(vote.Validator.Address); err != nil { h.logger.Error( - "failed to get consensus validator from staking keeper", + "failed to unmarshal validator consensus address", "err", err, ) - return gasEstimates, err - } - _, err = sdk.ValAddressFromBech32(val.OperatorAddress) - if err != nil { - return gasEstimates, err + return nil, err } - } - networks := []string{} - // get contracts on registry list - params := h.oracleKeeper.GasEstimateKeeper.GetParams(ctx) - for _, contract := range params.ContractRegistry { - networks = append(networks, contract.Network) + externalLiquidityList = append(externalLiquidityList, voteExt.ExternalLiquidity...) } - for _, network := range networks { - networkEstimates := []oracletypes.GasEstimate{} + // sort external liquidity so they are verified in the same order in ProcessProposalHandler + sort.Slice(externalLiquidityList, func(i, j int) bool { + return externalLiquidityList[i].PoolId < externalLiquidityList[j].PoolId + }) - for _, vote := range ci.Votes { - var voteExt oracletypes.OracleVoteExtension - if err := voteExt.Unmarshal(vote.VoteExtension); err != nil { - h.logger.Error( - "failed to decode vote extension", - "err", err, - ) - continue - } + return externalLiquidityList, nil +} - for _, estimate := range voteExt.GasEstimates { - if estimate.Network == network { - networkEstimates = append(networkEstimates, estimate) - } - } +func (h *ProposalHandler) verifyExternalLiquidity( + injectedExternalLiquidityList []oracletypes.ExternalLiquidity, + generatedExternalLiquidityList []oracletypes.ExternalLiquidity, +) error { + if len(injectedExternalLiquidityList) != len(generatedExternalLiquidityList) { + return oracletypes.ErrNonEqualInjVotesLen + } + + for i := range injectedExternalLiquidityList { + injectedExternalLiquidity := injectedExternalLiquidityList[i] + generatedExternalLiquidity := generatedExternalLiquidityList[i] + + if injectedExternalLiquidity.PoolId != generatedExternalLiquidity.PoolId { + return oracletypes.ErrNonEqualInjPoolID } - median, err := calculateMedian(networkEstimates) - if err != nil { - continue + if err := verifyAmountDepthInfo( + injectedExternalLiquidity.AmountDepthInfo, + generatedExternalLiquidity.AmountDepthInfo, + ); err != nil { + return err } - gasEstimates = append(gasEstimates, median) } - return gasEstimates, nil + return nil } -func (h *ProposalHandler) verifyMedianGasEstimations( - injectedEstimates []oracletypes.GasEstimate, - generatedEstimates []oracletypes.GasEstimate, +func verifyAmountDepthInfo( + injectedAmountDepthInfo []oracletypes.AssetAmountDepth, + generatedAmountDepthInfo []oracletypes.AssetAmountDepth, ) error { - if len(injectedEstimates) != len(generatedEstimates) { - return oracletypes.ErrNonEqualInjVotesLen + if len(injectedAmountDepthInfo) != 2 { + return oracletypes.ErrInvalidAssetDepthLen } - for i := range injectedEstimates { - injectedEstimate := injectedEstimates[i] - generatedEstimate := generatedEstimates[i] - - if injectedEstimate.Network != generatedEstimate.Network { - return oracletypes.ErrNonEqualInjVotesRates - } + if len(injectedAmountDepthInfo) != len(generatedAmountDepthInfo) { + return oracletypes.ErrInvalidAssetDepthLen + } - if injectedEstimate.GasEstimation != generatedEstimate.GasEstimation { - return oracletypes.ErrNonEqualInjVotesRates - } + if injectedAmountDepthInfo[0].Asset != generatedAmountDepthInfo[0].Asset || + injectedAmountDepthInfo[1].Asset != generatedAmountDepthInfo[1].Asset || + !injectedAmountDepthInfo[0].Amount.Equal(generatedAmountDepthInfo[0].Amount) || + !injectedAmountDepthInfo[1].Amount.Equal(generatedAmountDepthInfo[1].Amount) || + !injectedAmountDepthInfo[0].Depth.Equal(generatedAmountDepthInfo[0].Depth) || + !injectedAmountDepthInfo[1].Depth.Equal(generatedAmountDepthInfo[1].Depth) { + return oracletypes.ErrNonEqualAssetDepth } return nil diff --git a/x/oracle/abci/proposal_test.go b/x/oracle/abci/proposal_test.go index 1099312f..85b52c5f 100644 --- a/x/oracle/abci/proposal_test.go +++ b/x/oracle/abci/proposal_test.go @@ -21,17 +21,6 @@ import ( oracletypes "github.com/ojo-network/ojo/x/oracle/types" ) -var testGasEstimates = []oracletypes.GasEstimate{ - { - GasEstimation: 300, - Network: "Ethereum", - }, - { - GasEstimation: 100, - Network: "Arbitrum", - }, -} - func (s *IntegrationTestSuite) TestPrepareProposalHandler() { app, ctx, keys := s.app, s.ctx, s.keys @@ -124,9 +113,15 @@ func (s *IntegrationTestSuite) TestPrepareProposalHandler() { return valKeys[i].ValAddress.String() < valKeys[j].ValAddress.String() }) s.Require().Equal(exchangeRates, injectedVoteExtTx.ExchangeRateVotes[0].ExchangeRates) - s.Require().Equal(valKeys[0].ValAddress.String(), injectedVoteExtTx.ExchangeRateVotes[0].Voter) + s.Require().Equal( + sdk.ConsAddress(valKeys[0].PubKey.Address()).String(), + injectedVoteExtTx.ExchangeRateVotes[0].Voter, + ) s.Require().Equal(exchangeRates, injectedVoteExtTx.ExchangeRateVotes[1].ExchangeRates) - s.Require().Equal(valKeys[1].ValAddress.String(), injectedVoteExtTx.ExchangeRateVotes[1].Voter) + s.Require().Equal( + sdk.ConsAddress(valKeys[1].PubKey.Address()).String(), + injectedVoteExtTx.ExchangeRateVotes[1].Voter, + ) } }) } @@ -171,11 +166,11 @@ func (s *IntegrationTestSuite) TestProcessProposalHandler() { exchangeRateVotes := []oracletypes.AggregateExchangeRateVote{ { ExchangeRates: exchangeRates, - Voter: valKeys[0].ValAddress.String(), + Voter: sdk.ConsAddress(valKeys[0].PubKey.Address()).String(), }, { ExchangeRates: exchangeRates, - Voter: valKeys[1].ValAddress.String(), + Voter: sdk.ConsAddress(valKeys[1].PubKey.Address()).String(), }, } localCommitInfoBz, err := localCommitInfo.Marshal() @@ -183,7 +178,6 @@ func (s *IntegrationTestSuite) TestProcessProposalHandler() { injectedVoteExtTx := oracletypes.InjectedVoteExtensionTx{ ExchangeRateVotes: exchangeRateVotes, ExtendedCommitInfo: localCommitInfoBz, - GasEstimateMedians: testGasEstimates, } bz, err := injectedVoteExtTx.Marshal() s.Require().NoError(err) @@ -320,7 +314,6 @@ func buildLocalCommitInfo( voteExt := oracletypes.OracleVoteExtension{ ExchangeRates: exchangeRates, Height: ctx.BlockHeight(), - GasEstimates: testGasEstimates, } bz, err := voteExt.Marshal() if err != nil { diff --git a/x/oracle/abci/util.go b/x/oracle/abci/util.go index 74e3eced..18758237 100644 --- a/x/oracle/abci/util.go +++ b/x/oracle/abci/util.go @@ -1,11 +1,7 @@ package abci import ( - "fmt" - "sort" - sdk "github.com/cosmos/cosmos-sdk/types" - oracletypes "github.com/ojo-network/ojo/x/oracle/types" ) // VoteExtensionsEnabled determines if vote extensions are enabled for the current block. @@ -25,22 +21,3 @@ func VoteExtensionsEnabled(ctx sdk.Context) bool { return cp.Abci.VoteExtensionsEnableHeight < ctx.BlockHeight() } - -func calculateMedian(gasEstimates []oracletypes.GasEstimate) (median oracletypes.GasEstimate, err error) { - if len(gasEstimates) == 0 { - return oracletypes.GasEstimate{}, fmt.Errorf("cannot calculate median of empty slice") - } - - sort.Slice(gasEstimates, func(i, j int) bool { - return gasEstimates[i].GasEstimation < gasEstimates[j].GasEstimation - }) - - mid := len(gasEstimates) / 2 - if len(gasEstimates)%2 == 0 { - return oracletypes.GasEstimate{ - GasEstimation: (gasEstimates[mid-1].GasEstimation + gasEstimates[mid].GasEstimation) / 2, - Network: gasEstimates[mid-1].Network, // or gasEstimates[mid].Network, choose consistently - }, nil - } - return gasEstimates[mid], nil -} diff --git a/x/oracle/abci/voteextension.go b/x/oracle/abci/voteextension.go index e4da6a30..abfcfe41 100644 --- a/x/oracle/abci/voteextension.go +++ b/x/oracle/abci/voteextension.go @@ -2,12 +2,12 @@ package abci import ( "fmt" + "time" "cosmossdk.io/log" cometabci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - relayerClient "github.com/ojo-network/ojo-evm/relayer/relayer/client" "github.com/ojo-network/ojo/x/oracle/keeper" "github.com/ojo-network/ojo/x/oracle/types" "github.com/ojo-network/price-feeder/oracle" @@ -33,6 +33,8 @@ func NewVoteExtensionHandler( // 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) { + // Track timing to identify slow operations + start := time.Now() defer func() { // catch panics if possible if r := recover(); r != nil { @@ -59,7 +61,17 @@ func (h *VoteExtensionHandler) ExtendVoteHandler() sdk.ExtendVoteHandler { return &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, err } + // Check if price feeder has recent prices prices := h.oracleKeeper.PriceFeeder.Oracle.GetPrices() + if len(prices) == 0 { + h.logger.Warn( + "price feeder has no prices available", + "height", req.Height, + ) + // Return empty vote extension instead of failing + // This allows nodes to participate in consensus even if their price feeder is starting up + return &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, nil + } exchangeRatesStr := oracle.GenerateExchangeRatesString(prices) // Parse as DecCoins @@ -82,29 +94,32 @@ func (h *VoteExtensionHandler) ExtendVoteHandler() sdk.ExtendVoteHandler { } } - gasEstimates := []types.GasEstimate{} - estimateParams := h.oracleKeeper.GasEstimateKeeper.GetParams(ctx) - for _, contract := range estimateParams.ContractRegistry { - resp, err := relayerClient.EstimateGasFee( - contract.Network, - contract.Address, - estimateParams.GasLimit, - estimateParams.GasAdjustment, - ) - if err != nil { - h.logger.Error("error estimating gas fee", "error", err) - continue + externalLiquidityMsg := []types.ExternalLiquidity{} + externalLiquidity := h.oracleKeeper.PriceFeeder.Oracle.GetExternalLiquidity() + + for _, el := range externalLiquidity { + amountDepthInfo := []types.AssetAmountDepth{ + { + Asset: el.BaseAsset, + Amount: el.BaseAmount, + Depth: el.BaseDepth, + }, + { + Asset: el.QuoteAsset, + Amount: el.QuoteAmount, + Depth: el.QuoteDepth, + }, } - gasEstimates = append(gasEstimates, types.GasEstimate{ - GasEstimation: resp.Int64(), - Network: contract.Network, + externalLiquidityMsg = append(externalLiquidityMsg, types.ExternalLiquidity{ + PoolId: el.PoolID, + AmountDepthInfo: amountDepthInfo, }) } voteExt := types.OracleVoteExtension{ - Height: req.Height, - ExchangeRates: filteredDecCoins, - GasEstimates: gasEstimates, + Height: req.Height, + ExchangeRates: filteredDecCoins, + ExternalLiquidity: externalLiquidityMsg, } bz, err := voteExt.Marshal() @@ -117,10 +132,20 @@ func (h *VoteExtensionHandler) ExtendVoteHandler() sdk.ExtendVoteHandler { return &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, err } - h.logger.Info( - "created vote extension", - "height", req.Height, - ) + duration := time.Since(start) + if duration > 50*time.Millisecond { + h.logger.Warn( + "slow vote extension creation", + "height", req.Height, + "duration_ms", duration.Milliseconds(), + ) + } else { + h.logger.Info( + "created vote extension", + "height", req.Height, + "duration_ms", duration.Milliseconds(), + ) + } return &cometabci.ResponseExtendVote{VoteExtension: bz}, nil } } @@ -128,7 +153,7 @@ func (h *VoteExtensionHandler) ExtendVoteHandler() sdk.ExtendVoteHandler { // 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) ( + return func(_ sdk.Context, req *cometabci.RequestVerifyVoteExtension) ( *cometabci.ResponseVerifyVoteExtension, error, ) { @@ -151,11 +176,14 @@ func (h *VoteExtensionHandler) VerifyVoteExtensionHandler() sdk.VerifyVoteExtens 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( + // In edge cases (like 50/50 splits), being too strict about vote extensions + // can prevent consensus. Accept malformed extensions with a warning. + h.logger.Warn( + "accepting malformed vote extension to maintain liveness", "height", req.Height, - err.Error(), + "error", err.Error(), ) - return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_REJECT}, err + return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_ACCEPT}, nil } if voteExt.Height != req.Height { @@ -165,8 +193,14 @@ func (h *VoteExtensionHandler) VerifyVoteExtensionHandler() sdk.VerifyVoteExtens req.Height, voteExt.Height, ) - h.logger.Error(err.Error()) - return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_REJECT}, err + // Accept height mismatches to maintain liveness + h.logger.Warn( + "accepting vote extension with height mismatch to maintain liveness", + "expected", req.Height, + "got", voteExt.Height, + "error", err.Error(), + ) + return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_ACCEPT}, nil } h.logger.Info( diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go index 9f940be3..91ef0e7d 100644 --- a/x/oracle/client/cli/query.go +++ b/x/oracle/client/cli/query.go @@ -2,11 +2,13 @@ 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/cast" "github.com/spf13/cobra" "github.com/ojo-network/ojo/util/cli" @@ -32,6 +34,15 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryFeederDelegation(), GetCmdQueryMissCounter(), GetCmdQuerySlashWindow(), + CmdLatestPrices(), + CmdAllLatestPrices(), + CmdPriceHistory(), + CmdListPool(), + CmdShowPool(), + CmdListAccountedPool(), + CmdShowAccountedPool(), + CmdListAssetInfo(), + CmdShowAssetInfo(), ) return cmd @@ -277,3 +288,255 @@ func GetCmdQuerySlashWindow() *cobra.Command { flags.AddQueryFlagsToCmd(cmd) return cmd } + +func CmdLatestPrices() *cobra.Command { + cmd := &cobra.Command{ + Use: "latest-prices [denom1,denom2,...]", + Short: "list latest prices for multiple denoms", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + denomsList := strings.Split(args[0], ",") + + params := &types.QueryLatestPricesRequest{ + Denoms: denomsList, + } + + res, err := queryClient.LatestPrices(cmd.Context(), params) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdAllLatestPrices() *cobra.Command { + cmd := &cobra.Command{ + Use: "all-latest-prices", + Short: "list latest prices for all denoms", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllLatestPricesRequest{} + + res, err := queryClient.AllLatestPrices(cmd.Context(), params) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdPriceHistory() *cobra.Command { + cmd := &cobra.Command{ + Use: "price-history [asset]", + Short: "list price history of a given asset by descending timestamp", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryPriceHistoryRequest{ + Asset: args[0], + } + + res, err := queryClient.PriceHistory(cmd.Context(), params) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdListPool() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-pool", + Short: "list all pool", + Example: "elysd query amm list-pool", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryPoolAllRequest{} + + res, err := queryClient.PoolAll(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowPool() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-pool [pool-id]", + Short: "shows a pool", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + argPoolID, err := cast.ToUint64E(args[0]) + if err != nil { + return err + } + + params := &types.QueryPoolRequest{ + PoolId: argPoolID, + } + + res, err := queryClient.Pool(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdListAccountedPool() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-accounted-pool", + Short: "list all accounted pools", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAccountedPoolAllRequest{} + + res, err := queryClient.AccountedPoolAll(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowAccountedPool() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-accounted-pool [index]", + Short: "shows a accounted-pool", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + poolID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + params := &types.QueryAccountedPoolRequest{ + PoolId: poolID, + } + + res, err := queryClient.AccountedPool(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdListAssetInfo() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-asset-info", + Short: "list all assetInfo", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAssetInfoAllRequest{} + + res, err := queryClient.AssetInfoAll(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowAssetInfo() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-asset-info [index]", + Short: "shows a assetInfo", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + params := &types.QueryAssetInfoRequest{ + Denom: args[0], + } + + res, err := queryClient.AssetInfo(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/oracle/genesis.go b/x/oracle/genesis.go index 7734e6bf..274c87a4 100644 --- a/x/oracle/genesis.go +++ b/x/oracle/genesis.go @@ -37,7 +37,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, genState types.GenesisSt panic(err) } - keeper.SetMissCounter(ctx, operator, mc.MissCounter) + keeper.SetMissCounter(ctx, operator.String(), mc.MissCounter) } for _, ap := range genState.AggregateExchangeRatePrevotes { @@ -55,7 +55,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, genState types.GenesisSt panic(err) } - keeper.SetAggregateExchangeRateVote(ctx, valAddr, av) + keeper.SetAggregateExchangeRateVote(ctx, valAddr.String(), av) } for _, hp := range genState.HistoricPrices { @@ -109,9 +109,9 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { }) missCounters := []types.MissCounter{} - keeper.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) (stop bool) { + keeper.IterateMissCounters(ctx, func(operator string, missCounter uint64) (stop bool) { missCounters = append(missCounters, types.MissCounter{ - ValidatorAddress: operator.String(), + ValidatorAddress: operator, MissCounter: missCounter, }) @@ -130,7 +130,7 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { aggregateExchangeRateVotes := []types.AggregateExchangeRateVote{} keeper.IterateAggregateExchangeRateVotes( ctx, - func(_ sdk.ValAddress, aggregateVote types.AggregateExchangeRateVote) bool { + func(_ string, aggregateVote types.AggregateExchangeRateVote) bool { aggregateExchangeRateVotes = append(aggregateExchangeRateVotes, aggregateVote) return false }, diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go index bc0b3365..89606d47 100644 --- a/x/oracle/keeper/ballot.go +++ b/x/oracle/keeper/ballot.go @@ -18,7 +18,7 @@ func (k Keeper) OrganizeBallotByDenom( votes := map[string]types.ExchangeRateBallot{} // collect aggregate votes - aggregateHandler := func(voterAddr sdk.ValAddress, vote types.AggregateExchangeRateVote) bool { + aggregateHandler := func(voterAddr string, vote types.AggregateExchangeRateVote) bool { // organize ballot only for the active validators claim, ok := validatorClaimMap[vote.Voter] if ok { @@ -60,7 +60,7 @@ func (k Keeper) ClearBallots(ctx sdk.Context, votePeriod uint64) { // clear all aggregate votes k.IterateAggregateExchangeRateVotes( ctx, - func(voterAddr sdk.ValAddress, _ types.AggregateExchangeRateVote) bool { + func(voterAddr string, _ 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 index eb0b163d..d72ae799 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -17,7 +17,7 @@ func (s *IntegrationTestSuite) TestBallot_OrganizeBallotByDenom() { require.Empty(res) s.app.OracleKeeper.SetAggregateExchangeRateVote( - s.ctx, valAddr, types.AggregateExchangeRateVote{ + s.ctx, valAddr.String(), types.AggregateExchangeRateVote{ ExchangeRates: sdk.DecCoins{ sdk.DecCoin{ Denom: "OJO", @@ -32,12 +32,12 @@ func (s *IntegrationTestSuite) TestBallot_OrganizeBallotByDenom() { Power: 1, Weight: 1, MandatoryWinCount: 1, - Recipient: valAddr, + Recipient: valAddr.String(), } res = s.app.OracleKeeper.OrganizeBallotByDenom(s.ctx, claimMap) require.Equal([]types.BallotDenom{ { - Ballot: types.ExchangeRateBallot{types.NewVoteForTally(math.LegacyOneDec(), "OJO", valAddr, 1)}, + Ballot: types.ExchangeRateBallot{types.NewVoteForTally(math.LegacyOneDec(), "OJO", valAddr.String(), 1)}, Denom: "OJO", }, }, res) @@ -46,7 +46,7 @@ func (s *IntegrationTestSuite) TestBallot_OrganizeBallotByDenom() { func (s *IntegrationTestSuite) TestBallot_ClearBallots() { prevote := types.AggregateExchangeRatePrevote{ Hash: "hash", - Voter: addr.String(), + Voter: valAddr.String(), SubmitBlock: 0, } s.app.OracleKeeper.SetAggregateExchangeRatePrevote(s.ctx, valAddr, prevote) @@ -61,16 +61,16 @@ func (s *IntegrationTestSuite) TestBallot_ClearBallots() { }) vote := types.AggregateExchangeRateVote{ ExchangeRates: decCoins, - Voter: addr.String(), + Voter: valAddr.String(), } - s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr, vote) - voteRes, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(s.ctx, valAddr) + s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr.String(), vote) + voteRes, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(s.ctx, valAddr.String()) 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) + _, err = s.app.OracleKeeper.GetAggregateExchangeRateVote(s.ctx, valAddr.String()) s.Require().Error(err) } diff --git a/x/oracle/keeper/elys.go b/x/oracle/keeper/elys.go new file mode 100644 index 00000000..146b3b6b --- /dev/null +++ b/x/oracle/keeper/elys.go @@ -0,0 +1,253 @@ +package keeper + +import ( + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ojo-network/ojo/util" + "github.com/ojo-network/ojo/x/oracle/types" + "github.com/osmosis-labs/osmosis/osmomath" +) + +// SetPrice set a specific price in the store from its index +func (k Keeper) SetPrice(ctx sdk.Context, price types.Price) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz := k.cdc.MustMarshal(&price) + store.Set(types.KeyPrice(price.Asset, price.Timestamp), bz) +} + +func (k Keeper) getLatestPrice(ctx sdk.Context, asset string) (val types.Price, found bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStoreReversePrefixIterator(store, types.KeyPriceAsset(asset)) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.Price + k.cdc.MustUnmarshal(iterator.Value(), &val) + return val, true + } + + return val, false +} + +// RemovePrice removes a price from the store +func (k Keeper) RemovePrice(ctx sdk.Context, asset string, timestamp uint64) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store.Delete(types.KeyPrice(asset, timestamp)) +} + +// GetAllPrice returns all price +func (k Keeper) GetAllPrice(ctx sdk.Context) (list []types.Price) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefixPrice) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.Price + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} + +// GetAllAssetPrices returns all prices for a specific asset +func (k Keeper) GetAllAssetPrices(ctx sdk.Context, asset string) (list []*types.Price) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.KeyPriceAsset(asset)) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.Price + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, &val) + } + + return +} + +func (k Keeper) GetAssetPrice(ctx sdk.Context, asset string) (math.LegacyDec, bool) { + val, found := k.getLatestPrice(ctx, asset) + if found { + return val.Price, true + } + return math.LegacyDec{}, false +} + +func (k Keeper) GetDenomPrice(ctx sdk.Context, denom string) osmomath.BigDec { + info, found := k.GetAssetInfo(ctx, denom) + if !found { + return osmomath.ZeroBigDec() + } + price, found := k.GetAssetPrice(ctx, info.Display) + if !found { + return osmomath.ZeroBigDec() + } + if info.Decimal <= 18 { + return osmomath.BigDecFromDec(price).QuoInt64(util.Pow10Int64(info.Decimal)) + } + return osmomath.BigDecFromDec(price).Quo(util.Pow10(info.Decimal)) +} + +// SetAssetInfo set a specific assetInfo in the store from its index +func (k Keeper) SetAssetInfo(ctx sdk.Context, assetInfo types.AssetInfo) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz := k.cdc.MustMarshal(&assetInfo) + store.Set(types.KeyAssetInfo(assetInfo.Denom), bz) +} + +// GetAssetInfo returns a assetInfo from its index +func (k Keeper) GetAssetInfo(ctx sdk.Context, denom string) (val types.AssetInfo, found bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz := store.Get(types.KeyAssetInfo(denom)) + if bz == nil { + return val, false + } + + k.cdc.MustUnmarshal(bz, &val) + return val, true +} + +// RemoveAssetInfo removes a assetInfo from the store +func (k Keeper) RemoveAssetInfo(ctx sdk.Context, denom string) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store.Delete(types.KeyAssetInfo(denom)) +} + +// GetAllAssetInfo returns all assetInfo +func (k Keeper) GetAllAssetInfo(ctx sdk.Context) (list []types.AssetInfo) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefixAssetInfo) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.AssetInfo + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} + +// SetPriceFeeder set a specific priceFeeder in the store from its index +func (k Keeper) SetPriceFeeder(ctx sdk.Context, priceFeeder types.PriceFeeder) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyPriceFeeder(priceFeeder.Feeder) + bz := k.cdc.MustMarshal(&priceFeeder) + store.Set(key, bz) +} + +// GetPriceFeeder returns a priceFeeder from its index +func (k Keeper) GetPriceFeeder(ctx sdk.Context, feeder sdk.AccAddress) (val types.PriceFeeder, found bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyPriceFeeder(feeder.String()) + + bz := store.Get(key) + if bz == nil { + return val, false + } + + k.cdc.MustUnmarshal(bz, &val) + return val, true +} + +// RemovePriceFeeder removes a priceFeeder from the store +func (k Keeper) RemovePriceFeeder(ctx sdk.Context, feeder sdk.AccAddress) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyPriceFeeder(feeder.String()) + store.Delete(key) +} + +// SetPool sets a pool in the store from its index. +func (k Keeper) SetPool(ctx sdk.Context, pool types.Pool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyPool(pool.PoolId) + bz := k.cdc.MustMarshal(&pool) + store.Set(key, bz) +} + +// GetPool returns a pool from its index +func (k Keeper) GetPool(ctx sdk.Context, poolID uint64) (val types.Pool, found bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyPool(poolID) + + bz := store.Get(key) + if bz == nil { + return val, false + } + + k.cdc.MustUnmarshal(bz, &val) + return val, true +} + +// RemovePool removes a pool from the store +func (k Keeper) RemovePool(ctx sdk.Context, poolID uint64) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyPool(poolID) + store.Delete(key) +} + +// GetAllPool returns all pool +func (k Keeper) GetAllPool(ctx sdk.Context) (list []types.Pool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefixPool) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.Pool + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} + +// SetAccountedPool sets a accounted pool in the store from its index. +func (k Keeper) SetAccountedPool(ctx sdk.Context, accountedPool types.AccountedPool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyAccountedPool(accountedPool.PoolId) + bz := k.cdc.MustMarshal(&accountedPool) + store.Set(key, bz) +} + +// GetAccountedPool returns a accounted pool from its index +func (k Keeper) GetAccountedPool(ctx sdk.Context, poolID uint64) (val types.AccountedPool, found bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyAccountedPool(poolID) + + bz := store.Get(key) + if bz == nil { + return val, false + } + + k.cdc.MustUnmarshal(bz, &val) + return val, true +} + +// RemoveAccountedPool removes a accounted pool from the store +func (k Keeper) RemoveAccountedPool(ctx sdk.Context, poolID uint64) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.KeyAccountedPool(poolID) + store.Delete(key) +} + +// GetAllAccountedPool returns all accounted pool +func (k Keeper) GetAllAccountedPool(ctx sdk.Context) (list []types.AccountedPool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefixAccountedPool) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.AccountedPool + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} diff --git a/x/oracle/keeper/end_blocker.go b/x/oracle/keeper/end_blocker.go index f99707c2..f9fed3bc 100644 --- a/x/oracle/keeper/end_blocker.go +++ b/x/oracle/keeper/end_blocker.go @@ -28,6 +28,30 @@ func (k *Keeper) PruneAllPrices(ctx sdk.Context) { } } +// PruneElysPrices prunes elys prices for a given asset except the latest one. +func (k *Keeper) PruneElysPrices(ctx sdk.Context, asset string) { + prices := k.GetAllAssetPrices(ctx, asset) + if len(prices) <= 1 { + return // nothing to prune + } + + // Find the newest price + latestIdx, latestTs := 0, prices[0].Timestamp + for i := 1; i < len(prices); i++ { + if prices[i].Timestamp > latestTs { + latestIdx, latestTs = i, prices[i].Timestamp + } + } + + // Remove everything except the newest + for i, p := range prices { + if i == latestIdx { + continue + } + k.RemovePrice(ctx, p.Asset, p.Timestamp) + } +} + // 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 @@ -39,7 +63,7 @@ func (k *Keeper) RecordEndBlockMetrics(ctx sdk.Context) { return } - k.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) bool { + k.IterateMissCounters(ctx, func(operator string, missCounter uint64) bool { metrics.RecordMissCounter(operator, missCounter) return false }) diff --git a/x/oracle/keeper/genesis.go b/x/oracle/keeper/genesis.go index ed403278..a1072ee4 100644 --- a/x/oracle/keeper/genesis.go +++ b/x/oracle/keeper/genesis.go @@ -2,6 +2,7 @@ package keeper import ( storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ojo-network/ojo/x/oracle/types" @@ -13,7 +14,7 @@ func (k Keeper) IterateAllHistoricPrices( ctx sdk.Context, handler func(types.PriceStamp) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixHistoricPrice) defer iter.Close() @@ -48,7 +49,7 @@ func (k Keeper) IterateAllMedianPrices( ctx sdk.Context, handler func(types.PriceStamp) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixMedian) defer iter.Close() @@ -84,7 +85,7 @@ func (k Keeper) IterateAllMedianDeviationPrices( ctx sdk.Context, handler func(types.PriceStamp) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixMedianDeviation) defer iter.Close() diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index 200db541..cd1fe686 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "sort" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -60,10 +61,10 @@ func (q querier) ExchangeRates( return nil, err } - exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(req.Denom, exchangeRate)) + exchangeRates = exchangeRates.Add(sdk.DecCoin{Denom: req.Denom, Amount: exchangeRate}) } else { q.IterateExchangeRates(ctx, func(denom string, rate math.LegacyDec) (stop bool) { - exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(denom, rate)) + exchangeRates = exchangeRates.Add(sdk.DecCoin{Denom: denom, Amount: rate}) return false }) } @@ -134,7 +135,7 @@ func (q querier) MissCounter( ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryMissCounterResponse{ - MissCounter: q.GetMissCounter(ctx, valAddr), + MissCounter: q.GetMissCounter(ctx, valAddr.String()), }, nil } @@ -220,7 +221,7 @@ func (q querier) AggregateVote( ctx := sdk.UnwrapSDKContext(goCtx) - vote, err := q.GetAggregateExchangeRateVote(ctx, valAddr) + vote, err := q.GetAggregateExchangeRateVote(ctx, valAddr.String()) if err != nil { return nil, err } @@ -242,7 +243,7 @@ func (q querier) AggregateVotes( ctx := sdk.UnwrapSDKContext(goCtx) var votes []types.AggregateExchangeRateVote - q.IterateAggregateExchangeRateVotes(ctx, func(_ sdk.ValAddress, vote types.AggregateExchangeRateVote) bool { + q.IterateAggregateExchangeRateVotes(ctx, func(_ string, vote types.AggregateExchangeRateVote) bool { votes = append(votes, vote) return false }) @@ -316,15 +317,158 @@ func (q querier) ValidatorRewardSet( goCtx context.Context, req *types.QueryValidatorRewardSet, ) (*types.QueryValidatorRewardSetResponse, error) { + return &types.QueryValidatorRewardSetResponse{}, nil +} + +func (q querier) LatestPrices(goCtx context.Context, req *types.QueryLatestPricesRequest) (*types.QueryLatestPricesResponse, error) { if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + var prices []*types.LatestPrice + + for _, denom := range req.Denoms { + tokenLatestPrice := q.GetDenomPrice(ctx, denom) + prices = append(prices, &types.LatestPrice{ + Denom: denom, + LatestPrice: tokenLatestPrice.Dec(), + }) + } + + return &types.QueryLatestPricesResponse{ + Prices: prices, + }, nil +} + +func (q querier) AllLatestPrices(goCtx context.Context, req *types.QueryAllLatestPricesRequest) (*types.QueryAllLatestPricesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + var prices []*types.LatestPrice + + assetInfos := q.GetAllAssetInfo(ctx) + + for _, assetInfo := range assetInfos { + tokenLatestPrice := q.GetDenomPrice(ctx, assetInfo.Denom) + prices = append(prices, &types.LatestPrice{ + Denom: assetInfo.Denom, + LatestPrice: tokenLatestPrice.Dec(), + }) } + return &types.QueryAllLatestPricesResponse{ + Prices: prices, + }, nil +} + +func (q querier) PriceHistory(goCtx context.Context, req *types.QueryPriceHistoryRequest) (*types.QueryPriceHistoryResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + prices := q.GetAllAssetPrices(ctx, req.Asset) + + sort.Slice(prices, func(i, j int) bool { + return prices[i].Timestamp > prices[j].Timestamp + }) + + return &types.QueryPriceHistoryResponse{ + Prices: prices, + }, nil +} + +func (q querier) Pool(goCtx context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } ctx := sdk.UnwrapSDKContext(goCtx) - validatorRewardSet := q.GetValidatorRewardSet(ctx) + pool, found := q.GetPool(ctx, req.PoolId) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } - return &types.QueryValidatorRewardSetResponse{ - Validators: validatorRewardSet, + return &types.QueryPoolResponse{ + Pool: pool, }, nil } + +func (q querier) PoolAll(goCtx context.Context, req *types.QueryPoolAllRequest) (*types.QueryPoolAllResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + pools := q.GetAllPool(ctx) + + return &types.QueryPoolAllResponse{Pool: pools}, nil +} + +func (q querier) AccountedPoolAll( + goCtx context.Context, + req *types.QueryAccountedPoolAllRequest, +) (*types.QueryAccountedPoolAllResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + accountedPools := q.GetAllAccountedPool(ctx) + + return &types.QueryAccountedPoolAllResponse{AccountedPool: accountedPools}, nil +} + +func (q querier) AccountedPool( + goCtx context.Context, + req *types.QueryAccountedPoolRequest, +) (*types.QueryAccountedPoolResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + val, found := q.GetAccountedPool(ctx, req.PoolId) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + return &types.QueryAccountedPoolResponse{AccountedPool: val}, nil +} + +func (q querier) AssetInfoAll( + goCtx context.Context, + req *types.QueryAssetInfoAllRequest, +) (*types.QueryAssetInfoAllResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + assetInfos := q.GetAllAssetInfo(ctx) + + return &types.QueryAssetInfoAllResponse{AssetInfo: assetInfos}, nil +} + +func (q querier) AssetInfo( + goCtx context.Context, + req *types.QueryAssetInfoRequest, +) (*types.QueryAssetInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + val, found := q.GetAssetInfo(ctx, req.Denom) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + return &types.QueryAssetInfoResponse{AssetInfo: val}, nil +} diff --git a/x/oracle/keeper/grpc_query_test.go b/x/oracle/keeper/grpc_query_test.go index bdd7c1d7..846eaae0 100644 --- a/x/oracle/keeper/grpc_query_test.go +++ b/x/oracle/keeper/grpc_query_test.go @@ -71,7 +71,7 @@ func (s *IntegrationTestSuite) TestQuerier_MissCounter() { s.Require().NoError(err) s.Require().Equal(res.MissCounter, uint64(0)) - s.app.OracleKeeper.SetMissCounter(s.ctx, valAddr, missCounter) + s.app.OracleKeeper.SetMissCounter(s.ctx, valAddr.String(), missCounter) res, err = s.queryClient.MissCounter(s.ctx.Context(), &types.QueryMissCounter{ ValidatorAddr: valAddr.String(), @@ -126,7 +126,7 @@ func (s *IntegrationTestSuite) TestQuerier_AggregateVote() { ExchangeRates: decCoins, Voter: addr.String(), } - s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr, vote) + s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr.String(), vote) res, err := s.queryClient.AggregateVote(s.ctx.Context(), &types.QueryAggregateVote{ ValidatorAddr: valAddr.String(), @@ -194,9 +194,9 @@ func (s *IntegrationTestSuite) TestQuerier_AggregatePrevotesAppendVotes() { } func (s *IntegrationTestSuite) TestQuerier_AggregateVotesAppendVotes() { - s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr, types.NewAggregateExchangeRateVote( + s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr.String(), types.NewAggregateExchangeRateVote( types.DefaultGenesisState().ExchangeRates, - valAddr, + valAddr.String(), )) _, err := s.queryClient.AggregateVotes(s.ctx.Context(), &types.QueryAggregateVotes{}) @@ -290,23 +290,6 @@ func (s *IntegrationTestSuite) TestQuerier_MedianDeviations() { s.Require().Equal(res.MedianDeviations, expected) } -func (s *IntegrationTestSuite) TestQuerier_ValidatorRewardSet() { - app, ctx := s.app, s.ctx - originalBlockHeight := ctx.BlockHeight() - - slashWindowBlock := int64(app.OracleKeeper.SlashWindow(ctx)) - ctx = ctx.WithBlockHeight(slashWindowBlock) - err := app.OracleKeeper.SetValidatorRewardSet(ctx) - s.Require().NoError(err) - - ctx = ctx.WithBlockHeight(slashWindowBlock + 20) - valRewardSetResp, err := s.queryClient.ValidatorRewardSet(ctx.Context(), &types.QueryValidatorRewardSet{}) - s.Require().NoError(err) - s.Require().Equal(3, len(valRewardSetResp.Validators.ValidatorSet)) - - ctx = ctx.WithBlockHeight(originalBlockHeight) -} - func (s *IntegrationTestSuite) TestEmptyRequest() { q := keeper.NewQuerier(keeper.Keeper{}) const emptyRequestErrorMsg = "empty request" diff --git a/x/oracle/keeper/historic_price.go b/x/oracle/keeper/historic_price.go index 5f5e330e..2c8cd4ab 100644 --- a/x/oracle/keeper/historic_price.go +++ b/x/oracle/keeper/historic_price.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/errors" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ojo-network/ojo/util" @@ -69,7 +70,7 @@ func (k Keeper) SetHistoricMedian( blockNum uint64, median math.LegacyDec, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: median}) store.Set(types.KeyMedian(denom, blockNum), bz) } @@ -80,7 +81,7 @@ func (k Keeper) HistoricMedianDeviation( ctx sdk.Context, denom string, ) (*types.PriceStamp, error) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) blockDiff := util.SafeInt64ToUint64(ctx.BlockHeight())%k.MedianStampPeriod(ctx) + 1 blockNum := util.SafeInt64ToUint64(ctx.BlockHeight()) - blockDiff bz := store.Get(types.KeyMedianDeviation(denom, blockNum)) @@ -147,7 +148,7 @@ func (k Keeper) SetHistoricMedianDeviation( blockNum uint64, medianDeviation math.LegacyDec, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: medianDeviation}) store.Set(types.KeyMedianDeviation(denom, blockNum), bz) } @@ -258,7 +259,7 @@ func (k Keeper) IterateHistoricPrices( numStamps uint, handler func(math.LegacyDec) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) // make sure we have one zero byte to correctly separate denoms prefix := util.ConcatBytes(1, types.KeyPrefixHistoricPrice, []byte(denom)) @@ -283,7 +284,7 @@ func (k Keeper) IterateHistoricMedians( numStamps uint, handler func(types.PriceStamp) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) // make sure we have one zero byte to correctly separate denoms prefix := util.ConcatBytes(1, types.KeyPrefixMedian, []byte(denom)) @@ -310,7 +311,7 @@ func (k Keeper) IterateHistoricDeviations( numStamps uint, handler func(types.PriceStamp) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) // make sure we have one zero byte to correctly separate denoms prefix := util.ConcatBytes(1, types.KeyPrefixMedianDeviation, []byte(denom)) @@ -345,7 +346,7 @@ func (k Keeper) SetHistoricPrice( blockNum uint64, exchangeRate math.LegacyDec, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: exchangeRate}) store.Set(types.KeyHistoricPrice(denom, blockNum), bz) } @@ -357,7 +358,7 @@ func (k Keeper) DeleteHistoricPrice( denom string, blockNum uint64, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.KeyHistoricPrice(denom, blockNum)) } @@ -367,7 +368,7 @@ func (k Keeper) DeleteHistoricMedian( denom string, blockNum uint64, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.KeyMedian(denom, blockNum)) } @@ -378,7 +379,7 @@ func (k Keeper) DeleteHistoricMedianDeviation( denom string, blockNum uint64, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.KeyMedianDeviation(denom, blockNum)) } diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 05a9fbc8..c12e5b8d 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -4,12 +4,13 @@ import ( "fmt" "strings" + "cosmossdk.io/core/store" "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ojo-network/ojo/pricefeeder" @@ -21,15 +22,12 @@ var ten = math.LegacyMustNewDecFromStr("10") // Keeper of the oracle store type Keeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - paramSpace paramstypes.Subspace + cdc codec.BinaryCodec + storeService store.KVStoreService - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper - distrKeeper types.DistributionKeeper - StakingKeeper types.StakingKeeper - GasEstimateKeeper types.GasEstimateKeeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + StakingKeeper types.StakingKeeper PriceFeeder *pricefeeder.PriceFeeder @@ -43,13 +41,10 @@ type Keeper struct { // NewKeeper constructs a new keeper for oracle func NewKeeper( cdc codec.BinaryCodec, - storeKey storetypes.StoreKey, - paramspace paramstypes.Subspace, + storeService store.KVStoreService, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, - distrKeeper types.DistributionKeeper, stakingKeeper types.StakingKeeper, - gasEstimateKeeper types.GasEstimateKeeper, distrName string, telemetryEnabled bool, authority string, @@ -59,24 +54,16 @@ func NewKeeper( 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()) - } - return Keeper{ - cdc: cdc, - storeKey: storeKey, - paramSpace: paramspace, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - distrKeeper: distrKeeper, - StakingKeeper: stakingKeeper, - GasEstimateKeeper: gasEstimateKeeper, - PriceFeeder: &pricefeeder.PriceFeeder{}, - distrName: distrName, - telemetryEnabled: telemetryEnabled, - authority: authority, + cdc: cdc, + storeService: storeService, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + StakingKeeper: stakingKeeper, + PriceFeeder: &pricefeeder.PriceFeeder{}, + distrName: distrName, + telemetryEnabled: telemetryEnabled, + authority: authority, } } @@ -88,7 +75,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { // GetExchangeRate gets the consensus exchange rate of USD denominated in the // denom asset from the store. func (k Keeper) GetExchangeRate(ctx sdk.Context, symbol string) (math.LegacyDec, error) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) symbol = strings.ToUpper(symbol) b := store.Get(types.GetExchangeRateKey(symbol)) if b == nil { @@ -131,7 +118,7 @@ func (k Keeper) GetExchangeRateBase(ctx sdk.Context, denom string) (math.LegacyD // 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) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: exchangeRate}) denom = strings.ToUpper(denom) store.Set(types.GetExchangeRateKey(denom), bz) @@ -149,7 +136,7 @@ func (k Keeper) SetExchangeRateWithEvent(ctx sdk.Context, denom string, exchange // IterateExchangeRates iterates over USD rates in the store. func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(string, math.LegacyDec) bool) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixExchangeRate) defer iter.Close() @@ -167,7 +154,7 @@ func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(string, math. } func (k Keeper) ClearExchangeRates(ctx sdk.Context) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixExchangeRate) defer iter.Close() for ; iter.Valid(); iter.Next() { @@ -187,7 +174,7 @@ func (k Keeper) GetFeederDelegation(ctx sdk.Context, vAddr sdk.ValAddress) (sdk. return nil, stakingtypes.ErrNoValidatorFound.Wrapf("validator %s is not in active set", vAddr) } - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.GetFeederDelegationKey(vAddr)) if bz == nil { // no delegation, so validator itself must provide price feed @@ -199,7 +186,7 @@ func (k Keeper) GetFeederDelegation(ctx sdk.Context, vAddr sdk.ValAddress) (sdk. // 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) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Set(types.GetFeederDelegationKey(operator), delegatedFeeder.Bytes()) } @@ -208,7 +195,7 @@ type IterateFeederDelegationHandler func(delegator sdk.ValAddress, delegate sdk. // IterateFeederDelegations iterates over the feed delegates and performs a // callback function. func (k Keeper) IterateFeederDelegations(ctx sdk.Context, handler IterateFeederDelegationHandler) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixFeederDelegation) defer iter.Close() @@ -228,7 +215,7 @@ func (k Keeper) GetAggregateExchangeRatePrevote( ctx sdk.Context, voter sdk.ValAddress, ) (types.AggregateExchangeRatePrevote, error) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.GetAggregateExchangeRatePrevoteKey(voter)) if bz == nil { @@ -246,7 +233,7 @@ func (k Keeper) HasAggregateExchangeRatePrevote( ctx sdk.Context, voter sdk.ValAddress, ) bool { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) return store.Has(types.GetAggregateExchangeRatePrevoteKey(voter)) } @@ -256,7 +243,7 @@ func (k Keeper) SetAggregateExchangeRatePrevote( voter sdk.ValAddress, prevote types.AggregateExchangeRatePrevote, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&prevote) store.Set(types.GetAggregateExchangeRatePrevoteKey(voter), bz) @@ -264,7 +251,7 @@ func (k Keeper) SetAggregateExchangeRatePrevote( // DeleteAggregateExchangeRatePrevote deletes an oracle prevote from the store. func (k Keeper) DeleteAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.GetAggregateExchangeRatePrevoteKey(voter)) } @@ -273,7 +260,7 @@ func (k Keeper) IterateAggregateExchangeRatePrevotes( ctx sdk.Context, handler func(sdk.ValAddress, types.AggregateExchangeRatePrevote) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixAggregateExchangeRatePrevote) defer iter.Close() @@ -293,13 +280,13 @@ func (k Keeper) IterateAggregateExchangeRatePrevotes( // GetAggregateExchangeRateVote retrieves an oracle prevote from the store. func (k Keeper) GetAggregateExchangeRateVote( ctx sdk.Context, - voter sdk.ValAddress, + voter string, ) (types.AggregateExchangeRateVote, error) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.GetAggregateExchangeRateVoteKey(voter)) if bz == nil { - return types.AggregateExchangeRateVote{}, types.ErrNoAggregateVote.Wrap(voter.String()) + return types.AggregateExchangeRateVote{}, types.ErrNoAggregateVote.Wrap(voter) } var aggregateVote types.AggregateExchangeRateVote @@ -311,23 +298,23 @@ func (k Keeper) GetAggregateExchangeRateVote( // SetAggregateExchangeRateVote adds an oracle aggregate prevote to the store. func (k Keeper) SetAggregateExchangeRateVote( ctx sdk.Context, - voter sdk.ValAddress, + voter string, vote types.AggregateExchangeRateVote, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&vote) store.Set(types.GetAggregateExchangeRateVoteKey(voter), bz) } // DeleteAggregateExchangeRateVote deletes an oracle prevote from the store. -func (k Keeper) DeleteAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) DeleteAggregateExchangeRateVote(ctx sdk.Context, voter string) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.GetAggregateExchangeRateVoteKey(voter)) } type IterateExchangeRateVote = func( - voterAddr sdk.ValAddress, + voterAddr string, aggregateVote types.AggregateExchangeRateVote, ) (stop bool) @@ -336,13 +323,13 @@ func (k Keeper) IterateAggregateExchangeRateVotes( ctx sdk.Context, handler IterateExchangeRateVote, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixAggregateExchangeRateVote) defer iter.Close() for ; iter.Valid(); iter.Next() { - voterAddr := sdk.ValAddress(iter.Key()[2:]) + voterAddr := string(iter.Key()[1:]) var aggregateVote types.AggregateExchangeRateVote k.cdc.MustUnmarshal(iter.Value(), &aggregateVote) diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 1784e8cd..e24030f8 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -183,21 +183,21 @@ func (s *IntegrationTestSuite) TestAggregateExchangeRateVote() { ExchangeRates: decCoins, Voter: addr.String(), } - app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr, vote) + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr.String(), vote) - _, err := app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + _, err := app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr.String()) s.Require().NoError(err) - app.OracleKeeper.DeleteAggregateExchangeRateVote(ctx, valAddr) + app.OracleKeeper.DeleteAggregateExchangeRateVote(ctx, valAddr.String()) - _, err = app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + _, err = app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr.String()) s.Require().Error(err) } func (s *IntegrationTestSuite) TestAggregateExchangeRateVoteError() { app, ctx := s.app, s.ctx - _, err := app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + _, err := app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr.String()) s.Require().Errorf(err, types.ErrNoAggregateVote.Error()) } diff --git a/x/oracle/keeper/migrations.go b/x/oracle/keeper/migrations.go index fe6c4af8..874e46a8 100644 --- a/x/oracle/keeper/migrations.go +++ b/x/oracle/keeper/migrations.go @@ -15,15 +15,6 @@ 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) { diff --git a/x/oracle/keeper/miss_counter.go b/x/oracle/keeper/miss_counter.go index 1a9b21da..5caa96c4 100644 --- a/x/oracle/keeper/miss_counter.go +++ b/x/oracle/keeper/miss_counter.go @@ -2,6 +2,7 @@ package keeper import ( storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" gogotypes "github.com/gogo/protobuf/types" "github.com/ojo-network/ojo/x/oracle/types" @@ -9,8 +10,8 @@ import ( // GetMissCounter retrieves the # of vote periods missed in this oracle slash // window. -func (k Keeper) GetMissCounter(ctx sdk.Context, operator sdk.ValAddress) uint64 { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetMissCounter(ctx sdk.Context, operator string) uint64 { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.GetMissCounterKey(operator)) if bz == nil { @@ -26,28 +27,28 @@ func (k Keeper) GetMissCounter(ctx sdk.Context, operator sdk.ValAddress) uint64 // SetMissCounter updates the # of vote periods missed in this oracle slash // window. -func (k Keeper) SetMissCounter(ctx sdk.Context, operator sdk.ValAddress, missCounter uint64) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) SetMissCounter(ctx sdk.Context, operator string, missCounter uint64) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&gogotypes.UInt64Value{Value: missCounter}) store.Set(types.GetMissCounterKey(operator), bz) } // DeleteMissCounter removes miss counter for the validator. -func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator sdk.ValAddress) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator string) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.GetMissCounterKey(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) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) IterateMissCounters(ctx sdk.Context, handler func(string, uint64) bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixMissCounter) defer iter.Close() for ; iter.Valid(); iter.Next() { - operator := sdk.ValAddress(iter.Key()[2:]) + operator := string(iter.Key()[1:]) var missCounter gogotypes.UInt64Value k.cdc.MustUnmarshal(iter.Value(), &missCounter) diff --git a/x/oracle/keeper/miss_counter_test.go b/x/oracle/keeper/miss_counter_test.go index 9198d08b..df1b0803 100644 --- a/x/oracle/keeper/miss_counter_test.go +++ b/x/oracle/keeper/miss_counter_test.go @@ -12,12 +12,12 @@ 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) + s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr.String()), uint64(0)) + app.OracleKeeper.SetMissCounter(ctx, valAddr.String(), missCounter) + s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr.String()), missCounter) - app.OracleKeeper.DeleteMissCounter(ctx, valAddr) - s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr), uint64(0)) + app.OracleKeeper.DeleteMissCounter(ctx, valAddr.String()) + s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr.String()), uint64(0)) } func (s *IntegrationTestSuite) TestIterateMissCounters() { @@ -29,22 +29,20 @@ func (s *IntegrationTestSuite) TestIterateMissCounters() { for _, mc := range missCounters { operator, _ := sdk.ValAddressFromBech32(mc.ValidatorAddress) - keeper.SetMissCounter(ctx, operator, mc.MissCounter) + keeper.SetMissCounter(ctx, operator.String(), mc.MissCounter) } newCounters := []types.MissCounter{} - keeper.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) (stop bool) { + keeper.IterateMissCounters(ctx, func(operator string, missCounter uint64) (stop bool) { newCounters = append(newCounters, types.MissCounter{ - ValidatorAddress: operator.String(), + ValidatorAddress: operator, MissCounter: missCounter, }) return false }) - // Validator in integration test will incurr misses so expected amount of validators with miss counters - // is 1 more than what we manually set in this unit test. - require.Equal(s.T(), len(missCounters)+1, len(newCounters)) + require.Equal(s.T(), len(missCounters), len(newCounters)) FOUND: for _, oldCounter := range missCounters { diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index 88124269..b0d9a4d7 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -112,7 +112,11 @@ func (ms msgServer) AggregateExchangeRateVote( } // Move aggregate prevote to aggregate vote with given exchange rates - ms.SetAggregateExchangeRateVote(ctx, valAddr, types.NewAggregateExchangeRateVote(filteredDecCoins, valAddr)) + ms.SetAggregateExchangeRateVote( + ctx, + valAddr.String(), + types.NewAggregateExchangeRateVote(filteredDecCoins, valAddr.String()), + ) ms.DeleteAggregateExchangeRatePrevote(ctx, valAddr) return &types.MsgAggregateExchangeRateVoteResponse{}, nil diff --git a/x/oracle/keeper/msg_server_create_asset_info.go b/x/oracle/keeper/msg_server_create_asset_info.go new file mode 100644 index 00000000..5a24cd08 --- /dev/null +++ b/x/oracle/keeper/msg_server_create_asset_info.go @@ -0,0 +1,48 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ojo-network/ojo/x/oracle/types" +) + +func (ms msgServer) CreateAssetInfo( + goCtx context.Context, + msg *types.MsgCreateAssetInfo, +) (*types.MsgCreateAssetInfoResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + _, found := ms.GetAssetInfo(ctx, msg.Denom) + + if found { + return nil, errors.Wrapf(types.ErrAssetWasCreated, "%s", msg.Denom) + } + + ms.Keeper.SetAssetInfo(ctx, types.AssetInfo{ + Denom: msg.Denom, + Display: msg.Display, + Ticker: msg.Ticker, + Decimal: msg.Decimal, + }) + + return &types.MsgCreateAssetInfoResponse{}, nil +} + +func (ms msgServer) RemoveAssetInfo( + goCtx context.Context, + msg *types.MsgRemoveAssetInfo, +) (*types.MsgRemoveAssetInfoResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + if ms.authority != msg.Authority { + return nil, errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, msg.Authority, + ) + } + + ms.Keeper.RemoveAssetInfo(ctx, msg.Denom) + return &types.MsgRemoveAssetInfoResponse{}, nil +} diff --git a/x/oracle/keeper/msg_server_feed_multiple_prices.go b/x/oracle/keeper/msg_server_feed_multiple_prices.go new file mode 100644 index 00000000..e8e2cf09 --- /dev/null +++ b/x/oracle/keeper/msg_server_feed_multiple_prices.go @@ -0,0 +1,39 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ojo-network/ojo/util" + "github.com/ojo-network/ojo/x/oracle/types" +) + +func (ms msgServer) FeedMultiplePrices( + goCtx context.Context, + msg *types.MsgFeedMultiplePrices, +) (*types.MsgFeedMultiplePricesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + creator := sdk.MustAccAddressFromBech32(msg.Creator) + feeder, found := ms.Keeper.GetPriceFeeder(ctx, creator) + if !found { + return nil, types.ErrNotAPriceFeeder + } + + if !feeder.IsActive { + return nil, types.ErrPriceFeederNotActive + } + + for _, feedPrice := range msg.FeedPrices { + price := types.Price{ + Asset: feedPrice.Asset, + Price: feedPrice.Price, + Provider: msg.Creator, + Timestamp: util.SafeInt64ToUint64(ctx.BlockTime().Unix()), + BlockHeight: util.SafeInt64ToUint64(ctx.BlockHeight()), + } + ms.SetPrice(ctx, price) + } + + return &types.MsgFeedMultiplePricesResponse{}, nil +} diff --git a/x/oracle/keeper/msg_server_price.go b/x/oracle/keeper/msg_server_price.go new file mode 100644 index 00000000..b9b6df24 --- /dev/null +++ b/x/oracle/keeper/msg_server_price.go @@ -0,0 +1,34 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ojo-network/ojo/util" + "github.com/ojo-network/ojo/x/oracle/types" +) + +func (ms msgServer) FeedPrice(goCtx context.Context, msg *types.MsgFeedPrice) (*types.MsgFeedPriceResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + provider := sdk.MustAccAddressFromBech32(msg.Provider) + feeder, found := ms.Keeper.GetPriceFeeder(ctx, provider) + if !found { + return nil, types.ErrNotAPriceFeeder + } + + if !feeder.IsActive { + return nil, types.ErrPriceFeederNotActive + } + + price := types.Price{ + Asset: msg.FeedPrice.Asset, + Price: msg.FeedPrice.Price, + Provider: msg.Provider, + Timestamp: util.SafeInt64ToUint64(ctx.BlockTime().Unix()), + BlockHeight: util.SafeInt64ToUint64(ctx.BlockHeight()), + } + + ms.SetPrice(ctx, price) + return &types.MsgFeedPriceResponse{}, nil +} diff --git a/x/oracle/keeper/msg_server_price_feeder.go b/x/oracle/keeper/msg_server_price_feeder.go new file mode 100644 index 00000000..4e9f5c70 --- /dev/null +++ b/x/oracle/keeper/msg_server_price_feeder.go @@ -0,0 +1,81 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ojo-network/ojo/x/oracle/types" +) + +func (ms msgServer) SetPriceFeeder( + goCtx context.Context, + msg *types.MsgSetPriceFeeder, +) (*types.MsgSetPriceFeederResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + feederAccount := sdk.MustAccAddressFromBech32(msg.Feeder) + _, found := ms.Keeper.GetPriceFeeder(ctx, feederAccount) + if !found { + return nil, types.ErrNotAPriceFeeder + } + ms.Keeper.SetPriceFeeder(ctx, types.PriceFeeder{ + Feeder: msg.Feeder, + IsActive: msg.IsActive, + }) + return &types.MsgSetPriceFeederResponse{}, nil +} + +func (ms msgServer) DeletePriceFeeder( + goCtx context.Context, + msg *types.MsgDeletePriceFeeder, +) (*types.MsgDeletePriceFeederResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + feederAccount := sdk.MustAccAddressFromBech32(msg.Feeder) + _, found := ms.Keeper.GetPriceFeeder(ctx, feederAccount) + if !found { + return nil, types.ErrNotAPriceFeeder + } + ms.RemovePriceFeeder(ctx, feederAccount) + return &types.MsgDeletePriceFeederResponse{}, nil +} + +func (ms msgServer) AddPriceFeeders( + goCtx context.Context, + msg *types.MsgAddPriceFeeders, +) (*types.MsgAddPriceFeedersResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + if ms.authority != msg.Authority { + return nil, errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, msg.Authority, + ) + } + + for _, feeder := range msg.Feeders { + ms.Keeper.SetPriceFeeder(ctx, types.PriceFeeder{ + Feeder: feeder, + IsActive: true, + }) + } + return &types.MsgAddPriceFeedersResponse{}, nil +} + +func (ms msgServer) RemovePriceFeeders( + goCtx context.Context, + msg *types.MsgRemovePriceFeeders, +) (*types.MsgRemovePriceFeedersResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + if ms.authority != msg.Authority { + return nil, errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, msg.Authority, + ) + } + + for _, feeder := range msg.Feeders { + ms.Keeper.RemovePriceFeeder(ctx, sdk.MustAccAddressFromBech32(feeder)) + } + return &types.MsgRemovePriceFeedersResponse{}, nil +} diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go index a38e3cad..380945ca 100644 --- a/x/oracle/keeper/msg_server_test.go +++ b/x/oracle/keeper/msg_server_test.go @@ -120,7 +120,7 @@ func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRateVote() { )) _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsg) s.Require().NoError(err) - vote, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + vote, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr.String()) s.Require().Nil(err) for _, v := range vote.ExchangeRates { s.Require().Contains(acceptListFlat, v.Denom) @@ -135,7 +135,7 @@ func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRateVote() { )) _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsgInvalidRate) s.Require().NoError(err) - vote, err = s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + vote, err = s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr.String()) s.Require().NoError(err) for _, v := range vote.ExchangeRates { s.Require().Contains(acceptListFlat, v.Denom) diff --git a/x/oracle/keeper/param_update_plan.go b/x/oracle/keeper/param_update_plan.go index 29d8fad4..365ceddf 100644 --- a/x/oracle/keeper/param_update_plan.go +++ b/x/oracle/keeper/param_update_plan.go @@ -2,6 +2,7 @@ package keeper import ( storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ojo-network/ojo/util" @@ -17,7 +18,7 @@ func (k Keeper) ScheduleParamUpdatePlan(ctx sdk.Context, plan types.ParamUpdateP return err } - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := k.cdc.MustMarshal(&plan) store.Set(types.KeyParamUpdatePlan(util.SafeInt64ToUint64(plan.Height)), bz) @@ -32,7 +33,7 @@ func (k Keeper) ClearParamUpdatePlan(ctx sdk.Context, planHeight uint64) error { return types.ErrInvalidRequest.Wrapf("No param update plan found at block height %d", planHeight) } - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) store.Delete(types.KeyParamUpdatePlan(planHeight)) return nil } @@ -40,7 +41,7 @@ func (k Keeper) ClearParamUpdatePlan(ctx sdk.Context, planHeight uint64) error { // haveParamUpdatePlan will return whether a param update plan exists and the specified // plan height. func (k Keeper) haveParamUpdatePlan(ctx sdk.Context, planHeight uint64) bool { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) bz := store.Get(types.KeyParamUpdatePlan(planHeight)) return bz != nil } @@ -60,7 +61,7 @@ func (k Keeper) IterateParamUpdatePlans( ctx sdk.Context, handler func(types.ParamUpdatePlan) bool, ) { - store := ctx.KVStore(k.storeKey) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.KeyPrefixParamUpdatePlan) defer iter.Close() @@ -125,6 +126,9 @@ func (k Keeper) ValidateParamChanges(ctx sdk.Context, keys []string, changes typ case string(types.KeyCurrencyDeviationThresholds): params.CurrencyDeviationThresholds = changes.CurrencyDeviationThresholds + + case string(types.KeyExternalLiquidityPeriod): + params.ExternalLiquidityPeriod = changes.ExternalLiquidityPeriod } } @@ -180,6 +184,9 @@ func (k Keeper) ExecuteParamUpdatePlan(ctx sdk.Context, plan types.ParamUpdatePl case string(types.KeyCurrencyDeviationThresholds): k.SetCurrencyDeviationThresholds(ctx, plan.Changes.CurrencyDeviationThresholds) + + case string(types.KeyExternalLiquidityPeriod): + k.SetExternalLiquidityPeriod(ctx, plan.Changes.ExternalLiquidityPeriod) } } diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index 8e46147c..5788baec 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -7,184 +7,220 @@ import ( "github.com/ojo-network/ojo/x/oracle/types" "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/runtime" 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 +func (k Keeper) VotePeriod(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.VotePeriod } // 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) + params := k.GetParams(ctx) + params.VotePeriod = votePeriod + k.SetParams(ctx, params) } // 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 +func (k Keeper) VoteThreshold(ctx sdk.Context) math.LegacyDec { + params := k.GetParams(ctx) + return params.VoteThreshold } // 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) + params := k.GetParams(ctx) + params.VoteThreshold = voteThreshold + k.SetParams(ctx, params) } // 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 +func (k Keeper) RewardBands(ctx sdk.Context) types.RewardBandList { + params := k.GetParams(ctx) + return params.RewardBands } // 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) + params := k.GetParams(ctx) + params.RewardBands = rewardBands + k.SetParams(ctx, params) } // 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 +func (k Keeper) RewardDistributionWindow(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.RewardDistributionWindow } // 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) + params := k.GetParams(ctx) + params.RewardDistributionWindow = rewardDistributionWindow + k.SetParams(ctx, params) } // 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 +func (k Keeper) AcceptList(ctx sdk.Context) types.DenomList { + params := k.GetParams(ctx) + return params.AcceptList } // 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) + params := k.GetParams(ctx) + params.AcceptList = acceptList + k.SetParams(ctx, params) } // 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 +func (k Keeper) MandatoryList(ctx sdk.Context) types.DenomList { + params := k.GetParams(ctx) + return params.MandatoryList } // 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) + params := k.GetParams(ctx) + params.MandatoryList = mandatoryList + k.SetParams(ctx, params) } // 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 +func (k Keeper) SlashFraction(ctx sdk.Context) math.LegacyDec { + params := k.GetParams(ctx) + return params.SlashFraction } // SetSlashFraction updates the oracle voting penalty rate. func (k Keeper) SetSlashFraction(ctx sdk.Context, slashFraction math.LegacyDec) { - k.paramSpace.Set(ctx, types.KeySlashFraction, slashFraction) + params := k.GetParams(ctx) + params.SlashFraction = slashFraction + k.SetParams(ctx, params) } // 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 +func (k Keeper) SlashWindow(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.SlashWindow } // 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) + params := k.GetParams(ctx) + params.SlashWindow = slashWindow + k.SetParams(ctx, params) } // MinValidPerWindow returns the oracle slashing threshold. -func (k Keeper) MinValidPerWindow(ctx sdk.Context) (res math.LegacyDec) { - k.paramSpace.Get(ctx, types.KeyMinValidPerWindow, &res) - return +func (k Keeper) MinValidPerWindow(ctx sdk.Context) math.LegacyDec { + params := k.GetParams(ctx) + return params.MinValidPerWindow } // MinValidPerWindow updates the oracle slashing threshold. func (k Keeper) SetMinValidPerWindow(ctx sdk.Context, minValidPerWindow math.LegacyDec) { - k.paramSpace.Set(ctx, types.KeyMinValidPerWindow, minValidPerWindow) + params := k.GetParams(ctx) + params.MinValidPerWindow = minValidPerWindow + k.SetParams(ctx, params) } // 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 + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + + b := store.Get(types.KeyParams) + if b == nil { + return + } + + k.cdc.MustUnmarshal(b, ¶ms) + return } // SetParams sets the total set of oracle parameters. func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramSpace.SetParamSet(ctx, ¶ms) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + b := k.cdc.MustMarshal(¶ms) + store.Set(types.KeyParams, b) } // 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 +func (k Keeper) HistoricStampPeriod(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.HistoricStampPeriod } // 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) + params := k.GetParams(ctx) + params.HistoricStampPeriod = historicPriceStampPeriod + k.SetParams(ctx, params) } // 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 +func (k Keeper) MedianStampPeriod(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.MedianStampPeriod } // 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) + params := k.GetParams(ctx) + params.MedianStampPeriod = medianStampPeriod + k.SetParams(ctx, params) } // 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 +func (k Keeper) MaximumPriceStamps(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.MaximumPriceStamps } // 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) + params := k.GetParams(ctx) + params.MaximumPriceStamps = maximumPriceStamps + k.SetParams(ctx, params) } // 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 +func (k Keeper) MaximumMedianStamps(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.MaximumMedianStamps } // 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) + params := k.GetParams(ctx) + params.MaximumMedianStamps = maximumMedianStamps + k.SetParams(ctx, params) } // 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 +func (k Keeper) CurrencyPairProviders(ctx sdk.Context) types.CurrencyPairProvidersList { + params := k.GetParams(ctx) + return params.CurrencyPairProviders } // SetCurrencyPairProviders updates the current Currency Pair Providers the price feeder @@ -193,14 +229,16 @@ func (k Keeper) SetCurrencyPairProviders( ctx sdk.Context, currencyPairProviders types.CurrencyPairProvidersList, ) { - k.paramSpace.Set(ctx, types.KeyCurrencyPairProviders, currencyPairProviders) + params := k.GetParams(ctx) + params.CurrencyPairProviders = currencyPairProviders + k.SetParams(ctx, params) } // 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 +func (k Keeper) CurrencyDeviationThresholds(ctx sdk.Context) types.CurrencyDeviationThresholdList { + params := k.GetParams(ctx) + return params.CurrencyDeviationThresholds } // SetCurrencyDeviationThresholds updates the current Currency Deviation Thesholds the @@ -209,7 +247,9 @@ func (k Keeper) SetCurrencyDeviationThresholds( ctx sdk.Context, currencyDeviationThresholds types.CurrencyDeviationThresholdList, ) { - k.paramSpace.Set(ctx, types.KeyCurrencyDeviationThresholds, currencyDeviationThresholds) + params := k.GetParams(ctx) + params.CurrencyDeviationThresholds = currencyDeviationThresholds + k.SetParams(ctx, params) } func (k Keeper) GetExponent(ctx sdk.Context, denom string) (uint32, error) { @@ -221,3 +261,16 @@ func (k Keeper) GetExponent(ctx sdk.Context, denom string) (uint32, error) { } return 0, fmt.Errorf("unable to find exponent for %s", denom) } + +// ExternalLiquidityPeriod returns the number of blocks during which external liquidity updating takes place. +func (k Keeper) ExternalLiquidityPeriod(ctx sdk.Context) uint64 { + params := k.GetParams(ctx) + return params.ExternalLiquidityPeriod +} + +// SetExternalLiquidityPeriod updates the number of blocks during which external liquidity updating takes place. +func (k Keeper) SetExternalLiquidityPeriod(ctx sdk.Context, externalLiquidityPeriod uint64) { + params := k.GetParams(ctx) + params.ExternalLiquidityPeriod = externalLiquidityPeriod + k.SetParams(ctx, params) +} diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go deleted file mode 100644 index fb3bd6ea..00000000 --- a/x/oracle/keeper/reward.go +++ /dev/null @@ -1,116 +0,0 @@ -package keeper - -import ( - "fmt" - - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ojo-network/ojo/util" - "github.com/ojo-network/ojo/util/decmath" - "github.com/ojo-network/ojo/util/genmap" - "github.com/ojo-network/ojo/util/reward" - "github.com/ojo-network/ojo/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.OjoDenom, voteTargets) { - return voteTargets - } - rewardDenoms := make([]string, len(voteTargets)+1) - rewardDenoms[0] = types.OjoDenom - 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 deleted file mode 100644 index cfdfc51a..00000000 --- a/x/oracle/keeper/reward_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package keeper_test - -import ( - "fmt" - "math" - - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ojo-network/ojo/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.OjoDenom, 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.OjoSymbol, i)) - } - maximumMissCounts := uint64(len(voteTargets)) * (app.OracleKeeper.SlashWindow(ctx) / app.OracleKeeper.VotePeriod(ctx)) - - val1ExpectedRewardFactor := fmt.Sprintf("%f", 1-(math.Log(float64(missCounters[0].MissCounter-missCounters[0].MissCounter+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.OjoDenom)).Mul(sdkmath.LegacyMustNewDecFromStr(val1ExpectedRewardFactor).QuoInt64(int64(len(claims)))).QuoInt64(votePeriodsPerWindow).TruncateInt(), - outstandingRewardsVal1.AmountOf(types.OjoDenom)) - s.Require().Equal(sdkmath.LegacyNewDecFromInt(givingAmt.AmountOf(types.OjoDenom)).Mul(sdkmath.LegacyMustNewDecFromStr(val2ExpectedRewardFactor).QuoInt64(int64(len(claims)))).QuoInt64(votePeriodsPerWindow).TruncateInt(), - outstandingRewardsVal2.AmountOf(types.OjoDenom)) -} - -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.OjoDenom, 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.OjoDenom)).QuoInt64(votePeriodsPerWindow).QuoInt64(2).TruncateInt(), - outstandingRewardsVal1.AmountOf(types.OjoDenom)) - s.Require().Equal(sdkmath.LegacyNewDecFromInt(givingAmt.AmountOf(types.OjoDenom)).QuoInt64(votePeriodsPerWindow).QuoInt64(2).TruncateInt(), - outstandingRewardsVal2.AmountOf(types.OjoDenom)) -} - -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.OjoDenom)) - s.Require().Equal(sdkmath.LegacyZeroDec().TruncateInt(), outstandingRewardsVal2.AmountOf(types.OjoDenom)) -} - -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.OjoDenom)) - s.Require().Equal(sdkmath.LegacyZeroDec().TruncateInt(), outstandingRewardsVal2.AmountOf(types.OjoDenom)) -} diff --git a/x/oracle/keeper/reward_unit_test.go b/x/oracle/keeper/reward_unit_test.go deleted file mode 100644 index ca9d58e9..00000000 --- a/x/oracle/keeper/reward_unit_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package keeper - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestPrependOjoIfUnique(t *testing.T) { - require := require.New(t) - tcs := []struct { - in []string - out []string - }{ - // Should prepend "uojo" to a slice of denoms, unless it is already present. - {[]string{}, []string{"uojo"}}, - {[]string{"a"}, []string{"uojo", "a"}}, - {[]string{"x", "a", "heeeyyy"}, []string{"uojo", "x", "a", "heeeyyy"}}, - {[]string{"x", "a", "uojo"}, []string{"x", "a", "uojo"}}, - } - for i, tc := range tcs { - require.Equal(tc.out, prependOjoIfUnique(tc.in), i) - } -} diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go deleted file mode 100644 index 1b5ca4e4..00000000 --- a/x/oracle/keeper/slash.go +++ /dev/null @@ -1,110 +0,0 @@ -package keeper - -import ( - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ojo-network/ojo/util" - "github.com/ojo-network/ojo/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) { - var ( - possibleWinsPerSlashWindow = k.PossibleWinsPerSlashWindow(ctx) - minValidPerWindow = 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, missCounter uint64) bool { - validVotes := math.NewInt(possibleWinsPerSlashWindow - util.SafeUint64ToInt64(missCounter)) - validVoteRate := math.LegacyNewDecFromInt(validVotes).QuoInt64(possibleWinsPerSlashWindow) - - // Slash and jail the validator if their valid vote rate is smaller than the - // minimum threshold. - if validVoteRate.LT(minValidPerWindow) { - validator, err := k.StakingKeeper.Validator(ctx, operator) - if validator.IsBonded() && !validator.IsJailed() && err == nil { - consAddr, err := validator.GetConsAddr() - if err != nil { - panic(err) - } - - _, err = k.StakingKeeper.Slash( - ctx, - consAddr, - distributionHeight, - validator.GetConsensusPower(powerReduction), slashFraction, - ) - if err != nil { - panic(err) - } - - err = k.StakingKeeper.Jail(ctx, consAddr) - if err != nil { - panic(err) - } - } - } - - k.DeleteMissCounter(ctx, operator) - return false - }) -} - -// 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) - } - - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&validatorRewardSet) - store.Set(types.KeyValidatorRewardSet(), bz) - return nil -} - -// CurrentValidatorRewardSet returns the latest ValidatorRewardSet in the store. -func (k Keeper) GetValidatorRewardSet(ctx sdk.Context) types.ValidatorRewardSet { - store := ctx.KVStore(k.storeKey) - - bz := store.Get(types.KeyValidatorRewardSet()) - if bz == nil { - return types.ValidatorRewardSet{} - } - - var rewardSet types.ValidatorRewardSet - k.cdc.MustUnmarshal(bz, &rewardSet) - - return rewardSet -} diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go deleted file mode 100644 index 5cf6937f..00000000 --- a/x/oracle/keeper/slash_test.go +++ /dev/null @@ -1,141 +0,0 @@ -package keeper_test - -import ( - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/ojo-network/ojo/x/oracle/types" -) - -func (s *IntegrationTestSuite) TestSlashAndResetMissCounters() { - initialTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) - validator, err := s.app.StakingKeeper.Validator(s.ctx, valAddr) - 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 - s.app.StakingKeeper.SetValidator(s.ctx, validator) - - 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/types/abci.pb.go b/x/oracle/types/abci.pb.go index e74a793c..701b6523 100644 --- a/x/oracle/types/abci.pb.go +++ b/x/oracle/types/abci.pb.go @@ -4,7 +4,9 @@ package types import ( + 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" proto "github.com/cosmos/gogoproto/proto" @@ -28,9 +30,9 @@ 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"` - GasEstimates []GasEstimate `protobuf:"bytes,3,rep,name=gas_estimates,json=gasEstimates,proto3" json:"gas_estimates"` + 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"` + ExternalLiquidity []ExternalLiquidity `protobuf:"bytes,3,rep,name=external_liquidity,json=externalLiquidity,proto3" json:"external_liquidity"` } func (m *OracleVoteExtension) Reset() { *m = OracleVoteExtension{} } @@ -70,8 +72,8 @@ var xxx_messageInfo_OracleVoteExtension proto.InternalMessageInfo // 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"` - GasEstimateMedians []GasEstimate `protobuf:"bytes,3,rep,name=gas_estimate_medians,json=gasEstimateMedians,proto3" json:"gas_estimate_medians"` + ExternalLiquidity []ExternalLiquidity `protobuf:"bytes,2,rep,name=external_liquidity,json=externalLiquidity,proto3" json:"external_liquidity"` + ExtendedCommitInfo []byte `protobuf:"bytes,3,opt,name=extended_commit_info,json=extendedCommitInfo,proto3" json:"extended_commit_info,omitempty"` } func (m *InjectedVoteExtensionTx) Reset() { *m = InjectedVoteExtensionTx{} } @@ -107,24 +109,25 @@ func (m *InjectedVoteExtensionTx) XXX_DiscardUnknown() { var xxx_messageInfo_InjectedVoteExtensionTx proto.InternalMessageInfo -// GasEstimate defines a gas estimate for a given network. -type GasEstimate struct { - GasEstimation int64 `protobuf:"varint,1,opt,name=gas_estimation,json=gasEstimation,proto3" json:"gas_estimation,omitempty"` - Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` +// Elys Asset Amount Depth +type AssetAmountDepth struct { + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` + Depth cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=depth,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"depth"` } -func (m *GasEstimate) Reset() { *m = GasEstimate{} } -func (m *GasEstimate) String() string { return proto.CompactTextString(m) } -func (*GasEstimate) ProtoMessage() {} -func (*GasEstimate) Descriptor() ([]byte, []int) { +func (m *AssetAmountDepth) Reset() { *m = AssetAmountDepth{} } +func (m *AssetAmountDepth) String() string { return proto.CompactTextString(m) } +func (*AssetAmountDepth) ProtoMessage() {} +func (*AssetAmountDepth) Descriptor() ([]byte, []int) { return fileDescriptor_a17fd58ec0319b85, []int{2} } -func (m *GasEstimate) XXX_Unmarshal(b []byte) error { +func (m *AssetAmountDepth) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GasEstimate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AssetAmountDepth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GasEstimate.Marshal(b, m, deterministic) + return xxx_messageInfo_AssetAmountDepth.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -134,57 +137,105 @@ func (m *GasEstimate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *GasEstimate) XXX_Merge(src proto.Message) { - xxx_messageInfo_GasEstimate.Merge(m, src) +func (m *AssetAmountDepth) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssetAmountDepth.Merge(m, src) } -func (m *GasEstimate) XXX_Size() int { +func (m *AssetAmountDepth) XXX_Size() int { return m.Size() } -func (m *GasEstimate) XXX_DiscardUnknown() { - xxx_messageInfo_GasEstimate.DiscardUnknown(m) +func (m *AssetAmountDepth) XXX_DiscardUnknown() { + xxx_messageInfo_AssetAmountDepth.DiscardUnknown(m) } -var xxx_messageInfo_GasEstimate proto.InternalMessageInfo +var xxx_messageInfo_AssetAmountDepth proto.InternalMessageInfo + +// ExternalLiquidity defines price, volume, and time information for an exchange +// rate. +type ExternalLiquidity struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + AmountDepthInfo []AssetAmountDepth `protobuf:"bytes,2,rep,name=amount_depth_info,json=amountDepthInfo,proto3" json:"amount_depth_info"` +} + +func (m *ExternalLiquidity) Reset() { *m = ExternalLiquidity{} } +func (m *ExternalLiquidity) String() string { return proto.CompactTextString(m) } +func (*ExternalLiquidity) ProtoMessage() {} +func (*ExternalLiquidity) Descriptor() ([]byte, []int) { + return fileDescriptor_a17fd58ec0319b85, []int{3} +} +func (m *ExternalLiquidity) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExternalLiquidity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExternalLiquidity.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 *ExternalLiquidity) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExternalLiquidity.Merge(m, src) +} +func (m *ExternalLiquidity) XXX_Size() int { + return m.Size() +} +func (m *ExternalLiquidity) XXX_DiscardUnknown() { + xxx_messageInfo_ExternalLiquidity.DiscardUnknown(m) +} + +var xxx_messageInfo_ExternalLiquidity proto.InternalMessageInfo func init() { proto.RegisterType((*OracleVoteExtension)(nil), "ojo.oracle.v1.OracleVoteExtension") proto.RegisterType((*InjectedVoteExtensionTx)(nil), "ojo.oracle.v1.InjectedVoteExtensionTx") - proto.RegisterType((*GasEstimate)(nil), "ojo.oracle.v1.GasEstimate") + proto.RegisterType((*AssetAmountDepth)(nil), "ojo.oracle.v1.AssetAmountDepth") + proto.RegisterType((*ExternalLiquidity)(nil), "ojo.oracle.v1.ExternalLiquidity") } func init() { proto.RegisterFile("ojo/oracle/v1/abci.proto", fileDescriptor_a17fd58ec0319b85) } var fileDescriptor_a17fd58ec0319b85 = []byte{ - // 463 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xe3, 0x16, 0x15, 0xb1, 0x6d, 0x2a, 0xb1, 0x8d, 0xc0, 0x8a, 0x90, 0x1b, 0x45, 0x42, - 0x0a, 0x42, 0x5d, 0x13, 0xfa, 0x04, 0xa4, 0x44, 0x55, 0x0f, 0x80, 0x64, 0x21, 0x0e, 0x1c, 0xb0, - 0xd6, 0xf6, 0x74, 0xb3, 0x29, 0xde, 0xa9, 0xbc, 0x4b, 0x30, 0x6f, 0xc1, 0x73, 0xf0, 0x24, 0x39, - 0xf6, 0xc8, 0x89, 0x3f, 0xc9, 0x9d, 0x57, 0x00, 0xed, 0xda, 0x56, 0x9c, 0x9e, 0x38, 0x79, 0x77, - 0xbf, 0x99, 0xf9, 0x7d, 0xe3, 0x19, 0xe2, 0xe3, 0x1c, 0x43, 0x2c, 0x78, 0xfa, 0x11, 0xc2, 0xc5, - 0x38, 0xe4, 0x49, 0x2a, 0xd9, 0x75, 0x81, 0x06, 0x69, 0x17, 0xe7, 0xc8, 0x2a, 0x85, 0x2d, 0xc6, - 0xfd, 0x9e, 0x40, 0x81, 0x4e, 0x09, 0xed, 0xa9, 0x0a, 0xea, 0x07, 0x29, 0xea, 0x1c, 0x75, 0x98, - 0x70, 0x6d, 0xf3, 0x13, 0x30, 0x7c, 0x1c, 0xa6, 0x28, 0x55, 0xad, 0xf7, 0xb7, 0xcb, 0xd7, 0xe5, - 0x9c, 0x36, 0xfc, 0xe3, 0x91, 0xa3, 0x37, 0xee, 0xe1, 0x1d, 0x1a, 0x98, 0x96, 0x06, 0x94, 0x96, - 0xa8, 0xe8, 0x03, 0xb2, 0x37, 0x03, 0x29, 0x66, 0xc6, 0xf7, 0x06, 0xde, 0x68, 0x37, 0xaa, 0x6f, - 0xb4, 0x24, 0x87, 0x50, 0xa6, 0x33, 0xae, 0x04, 0xc4, 0x05, 0x37, 0xa0, 0xfd, 0x9d, 0xc1, 0xee, - 0x68, 0xff, 0xf9, 0x23, 0x56, 0x99, 0x60, 0xd6, 0x04, 0xab, 0x4d, 0xb0, 0x97, 0x90, 0x9e, 0xa1, - 0x54, 0x93, 0xd3, 0xe5, 0x8f, 0xe3, 0xce, 0xb7, 0x9f, 0xc7, 0x4f, 0x85, 0x34, 0xb3, 0x4f, 0x09, - 0x4b, 0x31, 0x0f, 0x6b, 0xd3, 0xd5, 0xe7, 0x44, 0x67, 0x57, 0xa1, 0xf9, 0x72, 0x0d, 0xba, 0xc9, - 0xd1, 0x51, 0xb7, 0x01, 0x45, 0x96, 0x43, 0xa7, 0xa4, 0x2b, 0xb8, 0x8e, 0x41, 0x1b, 0x99, 0x3b, - 0xf0, 0xae, 0x03, 0xf7, 0xd9, 0xd6, 0x2f, 0x62, 0xe7, 0x5c, 0x4f, 0xeb, 0x90, 0xc9, 0x1d, 0x8b, - 0x8d, 0x0e, 0xc4, 0xe6, 0x49, 0x0f, 0xff, 0x7a, 0xe4, 0xe1, 0x85, 0x9a, 0x43, 0x6a, 0x20, 0xdb, - 0x6a, 0xf9, 0x6d, 0x49, 0x3f, 0x90, 0xa3, 0xad, 0xe6, 0xe2, 0x05, 0x5a, 0x90, 0xe7, 0x40, 0xa3, - 0x5b, 0xa0, 0x17, 0x42, 0x14, 0x20, 0xb8, 0xad, 0xb0, 0xb1, 0x69, 0x2b, 0xd6, 0xd8, 0xfb, 0x70, - 0xeb, 0x5d, 0xd3, 0x67, 0xa4, 0x07, 0x16, 0x97, 0x41, 0x16, 0xa7, 0x98, 0xe7, 0xd2, 0xc4, 0x52, - 0x5d, 0xa2, 0xbf, 0x33, 0xf0, 0x46, 0x07, 0x11, 0x6d, 0xb4, 0x33, 0x27, 0x5d, 0xa8, 0x4b, 0xa4, - 0x11, 0xe9, 0xb5, 0x9b, 0x8e, 0x73, 0xc8, 0x24, 0x57, 0xff, 0xdf, 0x3b, 0x6d, 0xf5, 0xfe, 0xaa, - 0xca, 0x1d, 0xbe, 0x26, 0xfb, 0xad, 0x40, 0xfa, 0x98, 0x1c, 0xb6, 0x10, 0x12, 0x55, 0x3d, 0xf1, - 0xee, 0x26, 0xd5, 0x2e, 0x84, 0x4f, 0xee, 0x2a, 0x30, 0x9f, 0xb1, 0xb8, 0x72, 0x76, 0xef, 0x45, - 0xcd, 0x75, 0x72, 0xbe, 0xfc, 0x1d, 0x74, 0x96, 0xab, 0xc0, 0xbb, 0x59, 0x05, 0xde, 0xaf, 0x55, - 0xe0, 0x7d, 0x5d, 0x07, 0x9d, 0x9b, 0x75, 0xd0, 0xf9, 0xbe, 0x0e, 0x3a, 0xef, 0x9f, 0xb4, 0x46, - 0x8e, 0x73, 0x3c, 0xa9, 0xb3, 0xec, 0x39, 0x2c, 0x9b, 0xad, 0x74, 0x93, 0x4f, 0xf6, 0xdc, 0x4a, - 0x9e, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xff, 0x98, 0x69, 0xf4, 0x0f, 0x03, 0x00, 0x00, + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xc1, 0x6e, 0xd3, 0x4c, + 0x10, 0x8e, 0x93, 0x36, 0xbf, 0xfe, 0x85, 0x02, 0xdd, 0x56, 0xd4, 0x14, 0xe4, 0x44, 0x39, 0x05, + 0xa1, 0xda, 0x84, 0x3e, 0x41, 0xd3, 0x54, 0x55, 0xa4, 0x4a, 0x08, 0x0b, 0x38, 0x70, 0xc0, 0xda, + 0xac, 0xb7, 0xf6, 0xa6, 0xf1, 0x4e, 0xb0, 0x37, 0xc1, 0x39, 0x21, 0xf1, 0x04, 0x3c, 0x07, 0x67, + 0x8e, 0x3c, 0x40, 0x8e, 0x15, 0x27, 0xc4, 0xa1, 0x40, 0xf2, 0x1e, 0x08, 0xed, 0xae, 0xa3, 0x90, + 0x20, 0x2e, 0x70, 0xb2, 0x67, 0xbe, 0x99, 0x6f, 0xbe, 0xf9, 0x3c, 0x46, 0x36, 0xf4, 0xc1, 0x83, + 0x94, 0xd0, 0x01, 0xf3, 0xc6, 0x2d, 0x8f, 0xf4, 0x28, 0x77, 0x87, 0x29, 0x48, 0xc0, 0x5b, 0xd0, + 0x07, 0xd7, 0x20, 0xee, 0xb8, 0xb5, 0xbf, 0x1b, 0x41, 0x04, 0x1a, 0xf1, 0xd4, 0x9b, 0x29, 0xda, + 0x77, 0x28, 0x64, 0x09, 0x64, 0x5e, 0x8f, 0x64, 0xaa, 0xbf, 0xc7, 0x24, 0x69, 0x79, 0x14, 0xb8, + 0x28, 0xf0, 0xfd, 0x55, 0xfa, 0x82, 0xce, 0x60, 0x77, 0x4c, 0x6f, 0x60, 0x48, 0x4d, 0x60, 0xa0, + 0xc6, 0x0f, 0x0b, 0xed, 0x3c, 0xd6, 0xb5, 0xcf, 0x41, 0xb2, 0x93, 0x5c, 0x32, 0x91, 0x71, 0x10, + 0xf8, 0x36, 0xaa, 0xc6, 0x8c, 0x47, 0xb1, 0xb4, 0xad, 0xba, 0xd5, 0xac, 0xf8, 0x45, 0x84, 0x73, + 0x74, 0x83, 0xe5, 0x34, 0x26, 0x22, 0x62, 0x41, 0x4a, 0x24, 0xcb, 0xec, 0x72, 0xbd, 0xd2, 0xbc, + 0xf6, 0xe8, 0x9e, 0x5b, 0xd0, 0x2a, 0x7d, 0x6e, 0xa1, 0xcf, 0xed, 0x30, 0x7a, 0x0c, 0x5c, 0xb4, + 0x0f, 0xa7, 0x57, 0xb5, 0xd2, 0xfb, 0xaf, 0xb5, 0x07, 0x11, 0x97, 0xf1, 0xa8, 0xe7, 0x52, 0x48, + 0x0a, 0x19, 0xc5, 0xe3, 0x20, 0x0b, 0x2f, 0x3c, 0x39, 0x19, 0xb2, 0x6c, 0xd1, 0x93, 0xf9, 0x5b, + 0x8b, 0x41, 0xbe, 0x9a, 0x83, 0x9f, 0x21, 0xcc, 0x72, 0xc9, 0x52, 0x41, 0x06, 0xc1, 0x80, 0xbf, + 0x1a, 0xf1, 0x90, 0xcb, 0x89, 0x5d, 0xd1, 0xd3, 0xeb, 0xee, 0x8a, 0x85, 0xee, 0x49, 0x51, 0x78, + 0xb6, 0xa8, 0x6b, 0x6f, 0x28, 0x05, 0xfe, 0x36, 0x5b, 0x07, 0x1a, 0x6f, 0xcb, 0x68, 0xaf, 0x2b, + 0xfa, 0x8c, 0x4a, 0x16, 0xae, 0x58, 0xf0, 0x34, 0xc7, 0x2f, 0xd1, 0xce, 0xca, 0xb2, 0xc1, 0x18, + 0xd4, 0xc6, 0x96, 0x9e, 0xd9, 0x5c, 0x9b, 0x79, 0x14, 0x45, 0x29, 0x8b, 0x88, 0x62, 0x58, 0xca, + 0x56, 0x8c, 0xcb, 0xd9, 0xab, 0xf9, 0x3f, 0xad, 0x54, 0xfe, 0xc7, 0x95, 0xf0, 0x43, 0xb4, 0xab, + 0x92, 0x22, 0x64, 0x61, 0x40, 0x21, 0x49, 0xb8, 0x0c, 0xb8, 0x38, 0x07, 0xbb, 0x52, 0xb7, 0x9a, + 0xd7, 0x7d, 0xbc, 0xc0, 0x8e, 0x35, 0xd4, 0x15, 0xe7, 0xd0, 0xf8, 0x68, 0xa1, 0x5b, 0x47, 0x59, + 0xc6, 0xe4, 0x51, 0x02, 0x23, 0x21, 0x3b, 0x6c, 0x28, 0x63, 0xbc, 0x8b, 0x36, 0x89, 0xca, 0xe9, + 0x0b, 0xf8, 0xdf, 0x37, 0x01, 0xee, 0xa2, 0x2a, 0xd1, 0x45, 0x76, 0x59, 0xa5, 0xdb, 0x2d, 0xa5, + 0xe2, 0xcb, 0x55, 0xed, 0xae, 0xf9, 0x90, 0x59, 0x78, 0xe1, 0x72, 0xf0, 0x12, 0x22, 0x63, 0xf7, + 0x8c, 0x45, 0x84, 0x4e, 0x3a, 0x8c, 0x7e, 0xfa, 0x70, 0x80, 0x8a, 0xf3, 0xe8, 0x30, 0xea, 0x17, + 0x04, 0xf8, 0x14, 0x6d, 0x86, 0x6a, 0x92, 0x16, 0xf6, 0x57, 0x4c, 0xa6, 0xbf, 0xf1, 0x06, 0x6d, + 0xff, 0x66, 0x0f, 0xde, 0x43, 0xff, 0x0d, 0x01, 0x06, 0x01, 0x0f, 0xf5, 0x02, 0x1b, 0x7e, 0x55, + 0x85, 0xdd, 0x10, 0x3f, 0x41, 0xdb, 0x46, 0x40, 0xa0, 0xbb, 0x8d, 0x37, 0xc6, 0xf4, 0xda, 0xfa, + 0x37, 0x5d, 0xf3, 0xa4, 0xf0, 0xfc, 0x26, 0x59, 0xa6, 0x94, 0x7f, 0xed, 0xd3, 0xe9, 0x77, 0xa7, + 0x34, 0x9d, 0x39, 0xd6, 0xe5, 0xcc, 0xb1, 0xbe, 0xcd, 0x1c, 0xeb, 0xdd, 0xdc, 0x29, 0x5d, 0xce, + 0x9d, 0xd2, 0xe7, 0xb9, 0x53, 0x7a, 0x71, 0xff, 0x97, 0xab, 0x87, 0x3e, 0x1c, 0x08, 0x26, 0x5f, + 0x43, 0x7a, 0xa1, 0xde, 0xbd, 0x7c, 0xf1, 0xcf, 0xea, 0xe3, 0xef, 0x55, 0xf5, 0x5f, 0x79, 0xf8, + 0x33, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xc7, 0x9e, 0xbe, 0x2d, 0x04, 0x00, 0x00, } func (m *OracleVoteExtension) Marshal() (dAtA []byte, err error) { @@ -207,10 +258,10 @@ func (m *OracleVoteExtension) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.GasEstimates) > 0 { - for iNdEx := len(m.GasEstimates) - 1; iNdEx >= 0; iNdEx-- { + if len(m.ExternalLiquidity) > 0 { + for iNdEx := len(m.ExternalLiquidity) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.GasEstimates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ExternalLiquidity[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -263,10 +314,17 @@ func (m *InjectedVoteExtensionTx) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.GasEstimateMedians) > 0 { - for iNdEx := len(m.GasEstimateMedians) - 1; iNdEx >= 0; iNdEx-- { + 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] = 0x1a + } + if len(m.ExternalLiquidity) > 0 { + for iNdEx := len(m.ExternalLiquidity) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.GasEstimateMedians[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ExternalLiquidity[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -274,16 +332,9 @@ func (m *InjectedVoteExtensionTx) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintAbci(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } - 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-- { { @@ -301,7 +352,7 @@ func (m *InjectedVoteExtensionTx) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *GasEstimate) Marshal() (dAtA []byte, err error) { +func (m *AssetAmountDepth) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -311,25 +362,82 @@ func (m *GasEstimate) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GasEstimate) MarshalTo(dAtA []byte) (int, error) { +func (m *AssetAmountDepth) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GasEstimate) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AssetAmountDepth) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Network) > 0 { - i -= len(m.Network) - copy(dAtA[i:], m.Network) - i = encodeVarintAbci(dAtA, i, uint64(len(m.Network))) + { + size := m.Depth.Size() + i -= size + if _, err := m.Depth.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAbci(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAbci(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintAbci(dAtA, i, uint64(len(m.Asset))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExternalLiquidity) 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 *ExternalLiquidity) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExternalLiquidity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AmountDepthInfo) > 0 { + for iNdEx := len(m.AmountDepthInfo) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountDepthInfo[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAbci(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - if m.GasEstimation != 0 { - i = encodeVarintAbci(dAtA, i, uint64(m.GasEstimation)) + if m.PoolId != 0 { + i = encodeVarintAbci(dAtA, i, uint64(m.PoolId)) i-- dAtA[i] = 0x8 } @@ -362,8 +470,8 @@ func (m *OracleVoteExtension) Size() (n int) { n += 1 + l + sovAbci(uint64(l)) } } - if len(m.GasEstimates) > 0 { - for _, e := range m.GasEstimates { + if len(m.ExternalLiquidity) > 0 { + for _, e := range m.ExternalLiquidity { l = e.Size() n += 1 + l + sovAbci(uint64(l)) } @@ -383,32 +491,51 @@ func (m *InjectedVoteExtensionTx) Size() (n int) { n += 1 + l + sovAbci(uint64(l)) } } - l = len(m.ExtendedCommitInfo) - if l > 0 { - n += 1 + l + sovAbci(uint64(l)) - } - if len(m.GasEstimateMedians) > 0 { - for _, e := range m.GasEstimateMedians { + if len(m.ExternalLiquidity) > 0 { + for _, e := range m.ExternalLiquidity { 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 (m *GasEstimate) Size() (n int) { +func (m *AssetAmountDepth) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.GasEstimation != 0 { - n += 1 + sovAbci(uint64(m.GasEstimation)) - } - l = len(m.Network) + l = len(m.Asset) if l > 0 { n += 1 + l + sovAbci(uint64(l)) } + l = m.Amount.Size() + n += 1 + l + sovAbci(uint64(l)) + l = m.Depth.Size() + n += 1 + l + sovAbci(uint64(l)) + return n +} + +func (m *ExternalLiquidity) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovAbci(uint64(m.PoolId)) + } + if len(m.AmountDepthInfo) > 0 { + for _, e := range m.AmountDepthInfo { + l = e.Size() + n += 1 + l + sovAbci(uint64(l)) + } + } return n } @@ -502,7 +629,7 @@ func (m *OracleVoteExtension) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasEstimates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExternalLiquidity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -529,8 +656,8 @@ func (m *OracleVoteExtension) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GasEstimates = append(m.GasEstimates, GasEstimate{}) - if err := m.GasEstimates[len(m.GasEstimates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ExternalLiquidity = append(m.ExternalLiquidity, ExternalLiquidity{}) + if err := m.ExternalLiquidity[len(m.ExternalLiquidity)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -619,6 +746,40 @@ func (m *InjectedVoteExtensionTx) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalLiquidity", 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.ExternalLiquidity = append(m.ExternalLiquidity, ExternalLiquidity{}) + if err := m.ExternalLiquidity[len(m.ExternalLiquidity)-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 ExtendedCommitInfo", wireType) } @@ -652,11 +813,127 @@ func (m *InjectedVoteExtensionTx) Unmarshal(dAtA []byte) error { 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 (m *AssetAmountDepth) 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: AssetAmountDepth: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetAmountDepth: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + 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 ErrInvalidLengthAbci + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAbci + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + 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 ErrInvalidLengthAbci + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAbci + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasEstimateMedians", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Depth", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAbci @@ -666,23 +943,23 @@ func (m *InjectedVoteExtensionTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthAbci } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthAbci } if postIndex > l { return io.ErrUnexpectedEOF } - m.GasEstimateMedians = append(m.GasEstimateMedians, GasEstimate{}) - if err := m.GasEstimateMedians[len(m.GasEstimateMedians)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Depth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -707,7 +984,7 @@ func (m *InjectedVoteExtensionTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *GasEstimate) Unmarshal(dAtA []byte) error { +func (m *ExternalLiquidity) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -730,17 +1007,17 @@ func (m *GasEstimate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GasEstimate: wiretype end group for non-group") + return fmt.Errorf("proto: ExternalLiquidity: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GasEstimate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExternalLiquidity: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasEstimation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) } - m.GasEstimation = 0 + m.PoolId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAbci @@ -750,16 +1027,16 @@ func (m *GasEstimate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GasEstimation |= int64(b&0x7F) << shift + m.PoolId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AmountDepthInfo", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAbci @@ -769,23 +1046,25 @@ func (m *GasEstimate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAbci } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAbci } if postIndex > l { return io.ErrUnexpectedEOF } - m.Network = string(dAtA[iNdEx:postIndex]) + m.AmountDepthInfo = append(m.AmountDepthInfo, AssetAmountDepth{}) + if err := m.AmountDepthInfo[len(m.AmountDepthInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/oracle/types/asset.go b/x/oracle/types/asset.go index 54587b50..dd8a6d6d 100644 --- a/x/oracle/types/asset.go +++ b/x/oracle/types/asset.go @@ -23,7 +23,19 @@ const ( USDTDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" USDTSymbol string = "USDT" USDTExponent = uint32(18) + USDCDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + USDCSymbol string = "USDC" + USDCExponent = uint32(18) USDSymbol string = "USD" + AKTDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + AKTSymbol string = "AKT" + AKTExponent = uint32(6) + TIADenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + TIASymbol string = "TIA" + TIAExponent = uint32(6) + AXLDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + AXLSymbol string = "AXL" + AXLExponent = uint32(6) BlocksPerMinute = uint64(10) BlocksPerHour = BlocksPerMinute * 60 BlocksPerDay = BlocksPerHour * 24 diff --git a/x/oracle/types/ballot.go b/x/oracle/types/ballot.go index ffc9c457..2d65d282 100644 --- a/x/oracle/types/ballot.go +++ b/x/oracle/types/ballot.go @@ -5,19 +5,18 @@ import ( "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 + Voter string Power int64 } // NewVoteForTally returns a new VoteForTally instance. -func NewVoteForTally(rate math.LegacyDec, denom string, voter sdk.ValAddress, power int64) VoteForTally { +func NewVoteForTally(rate math.LegacyDec, denom string, voter string, power int64) VoteForTally { return VoteForTally{ ExchangeRate: rate, Denom: denom, @@ -34,7 +33,7 @@ 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 + exchangeRateMap[vote.Voter] = vote.ExchangeRate } } @@ -119,7 +118,7 @@ func (pb ExchangeRateBallot) Less(i, j int) bool { return true } if pb[i].ExchangeRate.Equal(pb[j].ExchangeRate) { - return bytes.Compare(pb[i].Voter, pb[j].Voter) < 0 + return bytes.Compare([]byte(pb[i].Voter), []byte(pb[j].Voter)) < 0 } return false } @@ -157,11 +156,11 @@ type Claim struct { Power int64 Weight int64 MandatoryWinCount int64 - Recipient sdk.ValAddress + Recipient string } // NewClaim generates a Claim instance. -func NewClaim(power, weight, mandatoryWinCount int64, recipient sdk.ValAddress) Claim { +func NewClaim(power, weight, mandatoryWinCount int64, recipient string) Claim { return Claim{ Power: power, Weight: weight, @@ -180,7 +179,7 @@ func ClaimMapToSlices(claims map[string]Claim, rewardSet []string) ([]Claim, []C i := 0 j := 0 for _, claim := range claims { - if _, ok := rewardMap[claim.Recipient.String()]; ok { + if _, ok := rewardMap[claim.Recipient]; ok { r[j] = Claim{ Power: claim.Power, Weight: claim.Weight, @@ -198,10 +197,10 @@ func ClaimMapToSlices(claims map[string]Claim, rewardSet []string) ([]Claim, []C i++ } sort.Slice(c, func(i, j int) bool { - return c[i].Recipient.String() < c[j].Recipient.String() + return c[i].Recipient < c[j].Recipient }) sort.Slice(r, func(i, j int) bool { - return r[i].Recipient.String() < r[j].Recipient.String() + return r[i].Recipient < r[j].Recipient }) return c, r } diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index f2d3e529..69772b2e 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -21,19 +21,19 @@ func TestToMap(t *testing.T) { }{ []VoteForTally{ { - Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()), + Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()).String(), Denom: OjoDenom, ExchangeRate: sdkmath.LegacyNewDec(1600), Power: 100, }, { - Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()), + Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()).String(), Denom: OjoDenom, ExchangeRate: sdkmath.LegacyZeroDec(), Power: 100, }, { - Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()), + Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()).String(), Denom: OjoDenom, ExchangeRate: sdkmath.LegacyNewDec(1500), Power: 100, @@ -46,7 +46,7 @@ func TestToMap(t *testing.T) { mapData := pb.ToMap() for i, vote := range tests.votes { - exchangeRate, ok := mapData[vote.Voter.String()] + exchangeRate, ok := mapData[vote.Voter] if tests.isValid[i] { require.True(t, ok) require.Equal(t, exchangeRate, vote.ExchangeRate) @@ -81,7 +81,7 @@ func TestPBPower(t *testing.T) { vote := NewVoteForTally( sdkmath.LegacyZeroDec(), OjoDenom, - valAccAddrs[i], + valAccAddrs[i].String(), power, ) @@ -99,7 +99,7 @@ func TestPBPower(t *testing.T) { fakeVote := NewVoteForTally( sdkmath.LegacyOneDec(), OjoDenom, - faceValAddr, + faceValAddr.String(), 0, ) @@ -170,7 +170,7 @@ func TestPBWeightedMedian(t *testing.T) { vote := NewVoteForTally( sdkmath.LegacyNewDec(int64(input)), OjoDenom, - valAddr, + valAddr.String(), power, ) @@ -253,7 +253,7 @@ func TestPBStandardDeviation(t *testing.T) { vote := NewVoteForTally( input, OjoDenom, - valAddr, + valAddr.String(), power, ) @@ -273,19 +273,19 @@ func TestPBStandardDeviation_Overflow(t *testing.T) { NewVoteForTally( sdkmath.LegacyOneDec(), OjoSymbol, - valAddr, + valAddr.String(), 2, ), NewVoteForTally( sdkmath.LegacyNewDec(1234), OjoSymbol, - valAddr, + valAddr.String(), 2, ), NewVoteForTally( overflowRate, OjoSymbol, - valAddr, + valAddr.String(), 1, ), } @@ -303,13 +303,13 @@ func TestBallotMapToSlice(t *testing.T) { NewVoteForTally( sdkmath.LegacyNewDec(1234), OjoSymbol, - valAddress[0], + valAddress[0].String(), 2, ), NewVoteForTally( sdkmath.LegacyNewDec(12345), OjoSymbol, - valAddress[0], + valAddress[0].String(), 1, ), } @@ -328,13 +328,13 @@ func TestExchangeRateBallotSwap(t *testing.T) { NewVoteForTally( sdkmath.LegacyNewDec(1234), OjoSymbol, - valAddress[0], + valAddress[0].String(), 2, ), NewVoteForTally( sdkmath.LegacyNewDec(12345), OjoSymbol, - valAddress[1], + valAddress[1].String(), 1, ), } @@ -354,13 +354,13 @@ func TestStandardDeviationUnsorted(t *testing.T) { NewVoteForTally( sdkmath.LegacyNewDec(1234), OjoSymbol, - valAddress[0], + valAddress[0].String(), 2, ), NewVoteForTally( sdkmath.LegacyNewDec(12), OjoSymbol, - valAddress[0], + valAddress[0].String(), 1, ), } @@ -372,15 +372,15 @@ func TestStandardDeviationUnsorted(t *testing.T) { func TestClaimMapToSlices(t *testing.T) { valAddresses := GenerateRandomValAddr(2) - claim1 := NewClaim(10, 1, 4, valAddresses[0]) - claim2 := NewClaim(10, 1, 4, valAddresses[1]) + claim1 := NewClaim(10, 1, 4, valAddresses[0].String()) + claim2 := NewClaim(10, 1, 4, valAddresses[1].String()) claimSlice, rewardSlice := ClaimMapToSlices( map[string]Claim{ "testClaim": claim1, "anotherClaim": claim2, }, []string{ - claim1.Recipient.String(), + claim1.Recipient, }, ) require.Contains(t, claimSlice, claim1, claim2) @@ -388,11 +388,11 @@ func TestClaimMapToSlices(t *testing.T) { } 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}} + v1 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.2"), Voter: sdk.ValAddress{0, 1}.String()} + v1Cpy := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.2"), Voter: sdk.ValAddress{0, 1}.String()} + v2 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.1"), Voter: sdk.ValAddress{0, 1, 1}.String()} + v3 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.1"), Voter: sdk.ValAddress{0, 1}.String()} + v4 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.5"), Voter: sdk.ValAddress{1}.String()} tcs := []struct { got ExchangeRateBallot diff --git a/x/oracle/types/currency_pair_providers_test.go b/x/oracle/types/currency_pair_providers_test.go index ae5c7fe4..9c612d65 100644 --- a/x/oracle/types/currency_pair_providers_test.go +++ b/x/oracle/types/currency_pair_providers_test.go @@ -23,14 +23,14 @@ func TestCurrencyPairProvidersString(t *testing.T) { 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", + "base_denom: RETH\nquote_denom: WETH\nbase_proxy_denom: \"\"\nquote_proxy_denom: \"\"\npool_id: 0\nextern_liquidity_provider: \"\"\ncrypto_compare_exchange: \"\"\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", + "base_denom: RETH\nquote_denom: WETH\nbase_proxy_denom: \"\"\nquote_proxy_denom: \"\"\npool_id: 0\nextern_liquidity_provider: \"\"\ncrypto_compare_exchange: \"\"\npair_address:\n - address: address\n address_provider: eth-uniswap\nproviders:\n - eth-uniswap", ) } diff --git a/x/oracle/types/elys.pb.go b/x/oracle/types/elys.pb.go new file mode 100644 index 00000000..865fdfce --- /dev/null +++ b/x/oracle/types/elys.pb.go @@ -0,0 +1,1843 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ojo/oracle/v1/elys.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Elys AssetInfo +type AssetInfo struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Display string `protobuf:"bytes,2,opt,name=display,proto3" json:"display,omitempty"` + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + Decimal uint64 `protobuf:"varint,4,opt,name=decimal,proto3" json:"decimal,omitempty"` +} + +func (m *AssetInfo) Reset() { *m = AssetInfo{} } +func (m *AssetInfo) String() string { return proto.CompactTextString(m) } +func (*AssetInfo) ProtoMessage() {} +func (*AssetInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{0} +} +func (m *AssetInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssetInfo.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 *AssetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssetInfo.Merge(m, src) +} +func (m *AssetInfo) XXX_Size() int { + return m.Size() +} +func (m *AssetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AssetInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AssetInfo proto.InternalMessageInfo + +type LatestPrice struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + LatestPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=latest_price,json=latestPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"latest_price"` +} + +func (m *LatestPrice) Reset() { *m = LatestPrice{} } +func (m *LatestPrice) String() string { return proto.CompactTextString(m) } +func (*LatestPrice) ProtoMessage() {} +func (*LatestPrice) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{1} +} +func (m *LatestPrice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LatestPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LatestPrice.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 *LatestPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_LatestPrice.Merge(m, src) +} +func (m *LatestPrice) XXX_Size() int { + return m.Size() +} +func (m *LatestPrice) XXX_DiscardUnknown() { + xxx_messageInfo_LatestPrice.DiscardUnknown(m) +} + +var xxx_messageInfo_LatestPrice proto.InternalMessageInfo + +// Elys Price +type Price struct { + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + Provider string `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"` + Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + BlockHeight uint64 `protobuf:"varint,5,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *Price) Reset() { *m = Price{} } +func (m *Price) String() string { return proto.CompactTextString(m) } +func (*Price) ProtoMessage() {} +func (*Price) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{2} +} +func (m *Price) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Price) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Price.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 *Price) XXX_Merge(src proto.Message) { + xxx_messageInfo_Price.Merge(m, src) +} +func (m *Price) XXX_Size() int { + return m.Size() +} +func (m *Price) XXX_DiscardUnknown() { + xxx_messageInfo_Price.DiscardUnknown(m) +} + +var xxx_messageInfo_Price proto.InternalMessageInfo + +// Elys PriceFeeder +type PriceFeeder struct { + Feeder string `protobuf:"bytes,1,opt,name=feeder,proto3" json:"feeder,omitempty"` + IsActive bool `protobuf:"varint,2,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` +} + +func (m *PriceFeeder) Reset() { *m = PriceFeeder{} } +func (m *PriceFeeder) String() string { return proto.CompactTextString(m) } +func (*PriceFeeder) ProtoMessage() {} +func (*PriceFeeder) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{3} +} +func (m *PriceFeeder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PriceFeeder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PriceFeeder.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 *PriceFeeder) XXX_Merge(src proto.Message) { + xxx_messageInfo_PriceFeeder.Merge(m, src) +} +func (m *PriceFeeder) XXX_Size() int { + return m.Size() +} +func (m *PriceFeeder) XXX_DiscardUnknown() { + xxx_messageInfo_PriceFeeder.DiscardUnknown(m) +} + +var xxx_messageInfo_PriceFeeder proto.InternalMessageInfo + +// Elys Pool +type Pool struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + PoolAssets []PoolAsset `protobuf:"bytes,2,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (m *Pool) String() string { return proto.CompactTextString(m) } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{4} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.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 *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +// Elys PoolAsset +type PoolAsset struct { + Token types.Coin `protobuf:"bytes,1,opt,name=token,proto3" json:"token"` + Weight cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.Int" json:"weight"` + ExternalLiquidityRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=external_liquidity_ratio,json=externalLiquidityRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"external_liquidity_ratio"` +} + +func (m *PoolAsset) Reset() { *m = PoolAsset{} } +func (m *PoolAsset) String() string { return proto.CompactTextString(m) } +func (*PoolAsset) ProtoMessage() {} +func (*PoolAsset) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{5} +} +func (m *PoolAsset) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PoolAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PoolAsset.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 *PoolAsset) XXX_Merge(src proto.Message) { + xxx_messageInfo_PoolAsset.Merge(m, src) +} +func (m *PoolAsset) XXX_Size() int { + return m.Size() +} +func (m *PoolAsset) XXX_DiscardUnknown() { + xxx_messageInfo_PoolAsset.DiscardUnknown(m) +} + +var xxx_messageInfo_PoolAsset proto.InternalMessageInfo + +// Elys AccountedPool +type AccountedPool struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + TotalTokens []types.Coin `protobuf:"bytes,2,rep,name=total_tokens,json=totalTokens,proto3" json:"total_tokens"` +} + +func (m *AccountedPool) Reset() { *m = AccountedPool{} } +func (m *AccountedPool) String() string { return proto.CompactTextString(m) } +func (*AccountedPool) ProtoMessage() {} +func (*AccountedPool) Descriptor() ([]byte, []int) { + return fileDescriptor_9fad3fefa6783858, []int{6} +} +func (m *AccountedPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountedPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountedPool.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 *AccountedPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountedPool.Merge(m, src) +} +func (m *AccountedPool) XXX_Size() int { + return m.Size() +} +func (m *AccountedPool) XXX_DiscardUnknown() { + xxx_messageInfo_AccountedPool.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountedPool proto.InternalMessageInfo + +func init() { + proto.RegisterType((*AssetInfo)(nil), "ojo.oracle.v1.AssetInfo") + proto.RegisterType((*LatestPrice)(nil), "ojo.oracle.v1.LatestPrice") + proto.RegisterType((*Price)(nil), "ojo.oracle.v1.Price") + proto.RegisterType((*PriceFeeder)(nil), "ojo.oracle.v1.PriceFeeder") + proto.RegisterType((*Pool)(nil), "ojo.oracle.v1.Pool") + proto.RegisterType((*PoolAsset)(nil), "ojo.oracle.v1.PoolAsset") + proto.RegisterType((*AccountedPool)(nil), "ojo.oracle.v1.AccountedPool") +} + +func init() { proto.RegisterFile("ojo/oracle/v1/elys.proto", fileDescriptor_9fad3fefa6783858) } + +var fileDescriptor_9fad3fefa6783858 = []byte{ + // 636 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xc1, 0x4e, 0xdb, 0x4c, + 0x10, 0x8e, 0x21, 0x09, 0x64, 0x0d, 0x97, 0x15, 0x3f, 0xbf, 0x81, 0xca, 0x50, 0x9f, 0xa8, 0x2a, + 0xec, 0x86, 0xaa, 0xe7, 0x2a, 0x01, 0x95, 0x46, 0xe2, 0x80, 0x5c, 0x4e, 0x55, 0x25, 0x77, 0xb3, + 0x5e, 0x92, 0x25, 0x6b, 0x8f, 0xeb, 0x5d, 0x02, 0x79, 0x8b, 0x3e, 0x0c, 0x6f, 0xd0, 0x0b, 0x47, + 0xc4, 0xa9, 0xea, 0x01, 0xb5, 0xe4, 0x15, 0xfa, 0x00, 0x95, 0x77, 0xed, 0xd0, 0xaa, 0x6a, 0x2b, + 0xb5, 0xb7, 0xfd, 0xe6, 0x9b, 0xf9, 0xc6, 0xf3, 0xcd, 0xc8, 0xc8, 0x81, 0x53, 0x08, 0x20, 0x27, + 0x54, 0xb0, 0x60, 0xdc, 0x0e, 0x98, 0x98, 0x48, 0x3f, 0xcb, 0x41, 0x01, 0x5e, 0x86, 0x53, 0xf0, + 0x0d, 0xe3, 0x8f, 0xdb, 0xeb, 0x2b, 0x03, 0x18, 0x80, 0x66, 0x82, 0xe2, 0x65, 0x92, 0xd6, 0xd7, + 0x28, 0xc8, 0x04, 0x64, 0x64, 0x08, 0x03, 0x4a, 0xca, 0x35, 0x28, 0xe8, 0x13, 0x59, 0x48, 0xf7, + 0x99, 0x22, 0xed, 0x80, 0x02, 0x4f, 0x0d, 0xef, 0x25, 0xa8, 0xd5, 0x91, 0x92, 0xa9, 0x5e, 0x7a, + 0x02, 0x78, 0x05, 0x35, 0x62, 0x96, 0x42, 0xe2, 0x58, 0x5b, 0xd6, 0x76, 0x2b, 0x34, 0x00, 0x3b, + 0x68, 0x21, 0xe6, 0x32, 0x13, 0x64, 0xe2, 0xcc, 0xe9, 0x78, 0x05, 0xf1, 0x2a, 0x6a, 0x2a, 0x4e, + 0x47, 0x2c, 0x77, 0xe6, 0x35, 0x51, 0x22, 0x5d, 0xc1, 0x28, 0x4f, 0x88, 0x70, 0xea, 0x5b, 0xd6, + 0x76, 0x3d, 0xac, 0xa0, 0x37, 0x41, 0xf6, 0x21, 0x51, 0x4c, 0xaa, 0xa3, 0x9c, 0x53, 0xf6, 0x8b, + 0x86, 0xc7, 0x68, 0x49, 0xe8, 0xa4, 0x28, 0x2b, 0xb2, 0x4c, 0xd7, 0x6e, 0xfb, 0xea, 0x76, 0xb3, + 0xf6, 0xe9, 0x76, 0x73, 0xc3, 0x4c, 0x24, 0xe3, 0x91, 0xcf, 0x21, 0x48, 0x88, 0x1a, 0xfa, 0x87, + 0x6c, 0x40, 0xe8, 0x64, 0x9f, 0xd1, 0x9b, 0xcb, 0x1d, 0x54, 0x8e, 0xbf, 0xcf, 0x68, 0x68, 0x8b, + 0xfb, 0x5e, 0xde, 0x07, 0x0b, 0x35, 0x66, 0x5d, 0x49, 0x31, 0x73, 0xd5, 0x55, 0x03, 0x7c, 0x80, + 0x1a, 0xff, 0xd8, 0xce, 0xd4, 0xe3, 0x75, 0xb4, 0x98, 0xe5, 0x30, 0xe6, 0xf1, 0xcc, 0x97, 0x19, + 0xc6, 0x0f, 0x50, 0x4b, 0xf1, 0x84, 0x49, 0x45, 0x92, 0xac, 0xf4, 0xe6, 0x3e, 0x80, 0x1f, 0xa2, + 0xa5, 0xbe, 0x00, 0x3a, 0x8a, 0x86, 0x8c, 0x0f, 0x86, 0xca, 0x69, 0xe8, 0x04, 0x5b, 0xc7, 0x5e, + 0xea, 0x90, 0xf7, 0x06, 0xd9, 0x7a, 0x88, 0x17, 0x8c, 0x15, 0x7a, 0x4f, 0x50, 0xf3, 0x44, 0xbf, + 0xcc, 0x2c, 0x5d, 0xe7, 0xe6, 0x72, 0x67, 0xa5, 0xfc, 0xa4, 0x4e, 0x1c, 0xe7, 0x4c, 0xca, 0x57, + 0x2a, 0xe7, 0xe9, 0x20, 0x2c, 0xf3, 0xf0, 0x06, 0x6a, 0x71, 0x19, 0x11, 0xaa, 0xf8, 0xd8, 0x8c, + 0xba, 0x18, 0x2e, 0x72, 0xd9, 0xd1, 0xd8, 0x7b, 0x8b, 0xea, 0x47, 0x00, 0x02, 0xff, 0x8f, 0x16, + 0x32, 0x00, 0x11, 0xf1, 0x58, 0xeb, 0xd6, 0xc3, 0x66, 0x01, 0x7b, 0x31, 0x7e, 0x8e, 0x6c, 0x4d, + 0x68, 0xcb, 0xa4, 0x33, 0xb7, 0x35, 0xbf, 0x6d, 0xef, 0x3a, 0xfe, 0x0f, 0x47, 0xea, 0x17, 0x12, + 0xfa, 0xa8, 0xba, 0xf5, 0xc2, 0xc4, 0x10, 0x65, 0x55, 0x40, 0x7a, 0x5f, 0x2d, 0xd4, 0x9a, 0xf1, + 0xf8, 0x19, 0x6a, 0x28, 0x18, 0xb1, 0x54, 0x77, 0xb1, 0x77, 0xd7, 0xfc, 0xf2, 0xd3, 0x8b, 0x6b, + 0xf5, 0xcb, 0x6b, 0xf5, 0xf7, 0x80, 0xa7, 0xa5, 0x92, 0xc9, 0xc6, 0x7b, 0xa8, 0x79, 0x6e, 0x1c, + 0x32, 0xbb, 0x7a, 0x5c, 0xee, 0xea, 0xbf, 0x9f, 0x77, 0xd5, 0x4b, 0xd5, 0x77, 0x5b, 0xea, 0xa5, + 0x2a, 0x2c, 0x4b, 0xf1, 0x08, 0x39, 0xec, 0x42, 0xb1, 0x3c, 0x25, 0x22, 0x12, 0xfc, 0xdd, 0x19, + 0x8f, 0xb9, 0x9a, 0x44, 0x39, 0x51, 0x1c, 0xcc, 0xda, 0xfe, 0xe6, 0x04, 0x56, 0x2b, 0xc9, 0xc3, + 0x4a, 0x31, 0x2c, 0x04, 0x3d, 0x81, 0x96, 0x3b, 0x94, 0xc2, 0x59, 0xaa, 0x58, 0xfc, 0x7b, 0x87, + 0xbb, 0x68, 0x49, 0x81, 0x22, 0x22, 0xd2, 0xa3, 0x56, 0x16, 0xff, 0xd1, 0x19, 0x5b, 0x17, 0x1d, + 0xeb, 0x9a, 0xee, 0xc1, 0xd5, 0x17, 0xb7, 0x76, 0x75, 0xe7, 0x5a, 0xd7, 0x77, 0xae, 0xf5, 0xf9, + 0xce, 0xb5, 0xde, 0x4f, 0xdd, 0xda, 0xf5, 0xd4, 0xad, 0x7d, 0x9c, 0xba, 0xb5, 0xd7, 0x8f, 0x06, + 0x5c, 0x0d, 0xcf, 0xfa, 0x3e, 0x85, 0x24, 0x80, 0x53, 0xd8, 0x49, 0x99, 0x3a, 0x87, 0x7c, 0x54, + 0xbc, 0x83, 0x8b, 0xea, 0x2f, 0xa4, 0x26, 0x19, 0x93, 0xfd, 0xa6, 0xfe, 0x49, 0x3c, 0xfd, 0x16, + 0x00, 0x00, 0xff, 0xff, 0xa6, 0x20, 0x34, 0xae, 0xa0, 0x04, 0x00, 0x00, +} + +func (m *AssetInfo) 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 *AssetInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Decimal != 0 { + i = encodeVarintElys(dAtA, i, uint64(m.Decimal)) + i-- + dAtA[i] = 0x20 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintElys(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x1a + } + if len(m.Display) > 0 { + i -= len(m.Display) + copy(dAtA[i:], m.Display) + i = encodeVarintElys(dAtA, i, uint64(len(m.Display))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintElys(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LatestPrice) 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 *LatestPrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LatestPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.LatestPrice.Size() + i -= size + if _, err := m.LatestPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintElys(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Price) 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 *Price) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Price) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintElys(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x28 + } + if m.Timestamp != 0 { + i = encodeVarintElys(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x20 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintElys(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintElys(dAtA, i, uint64(len(m.Asset))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PriceFeeder) 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 *PriceFeeder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PriceFeeder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsActive { + i-- + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Feeder) > 0 { + i -= len(m.Feeder) + copy(dAtA[i:], m.Feeder) + i = encodeVarintElys(dAtA, i, uint64(len(m.Feeder))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Pool) 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 *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PoolAssets) > 0 { + for iNdEx := len(m.PoolAssets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.PoolId != 0 { + i = encodeVarintElys(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PoolAsset) 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 *PoolAsset) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PoolAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ExternalLiquidityRatio.Size() + i -= size + if _, err := m.ExternalLiquidityRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Weight.Size() + i -= size + if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *AccountedPool) 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 *AccountedPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountedPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TotalTokens) > 0 { + for iNdEx := len(m.TotalTokens) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintElys(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.PoolId != 0 { + i = encodeVarintElys(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintElys(dAtA []byte, offset int, v uint64) int { + offset -= sovElys(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AssetInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + l = len(m.Display) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + if m.Decimal != 0 { + n += 1 + sovElys(uint64(m.Decimal)) + } + return n +} + +func (m *LatestPrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + l = m.LatestPrice.Size() + n += 1 + l + sovElys(uint64(l)) + return n +} + +func (m *Price) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Asset) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovElys(uint64(l)) + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + sovElys(uint64(m.Timestamp)) + } + if m.BlockHeight != 0 { + n += 1 + sovElys(uint64(m.BlockHeight)) + } + return n +} + +func (m *PriceFeeder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Feeder) + if l > 0 { + n += 1 + l + sovElys(uint64(l)) + } + if m.IsActive { + n += 2 + } + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovElys(uint64(m.PoolId)) + } + if len(m.PoolAssets) > 0 { + for _, e := range m.PoolAssets { + l = e.Size() + n += 1 + l + sovElys(uint64(l)) + } + } + return n +} + +func (m *PoolAsset) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Token.Size() + n += 1 + l + sovElys(uint64(l)) + l = m.Weight.Size() + n += 1 + l + sovElys(uint64(l)) + l = m.ExternalLiquidityRatio.Size() + n += 1 + l + sovElys(uint64(l)) + return n +} + +func (m *AccountedPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovElys(uint64(m.PoolId)) + } + if len(m.TotalTokens) > 0 { + for _, e := range m.TotalTokens { + l = e.Size() + n += 1 + l + sovElys(uint64(l)) + } + } + return n +} + +func sovElys(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozElys(x uint64) (n int) { + return sovElys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AssetInfo) 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 ErrIntOverflowElys + } + 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: AssetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetInfo: 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 ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + 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 Display", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Display = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimal", wireType) + } + m.Decimal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LatestPrice) 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 ErrIntOverflowElys + } + 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: LatestPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LatestPrice: 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 ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + 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 LatestPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LatestPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Price) 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 ErrIntOverflowElys + } + 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: Price: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Price: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PriceFeeder) 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 ErrIntOverflowElys + } + 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: PriceFeeder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriceFeeder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Feeder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsActive = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) 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 ErrIntOverflowElys + } + 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: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthElys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolAssets = append(m.PoolAssets, PoolAsset{}) + if err := m.PoolAssets[len(m.PoolAssets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PoolAsset) 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 ErrIntOverflowElys + } + 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: PoolAsset: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PoolAsset: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthElys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalLiquidityRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + 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 ErrInvalidLengthElys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExternalLiquidityRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountedPool) 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 ErrIntOverflowElys + } + 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: AccountedPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountedPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowElys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthElys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthElys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalTokens = append(m.TotalTokens, types.Coin{}) + if err := m.TotalTokens[len(m.TotalTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipElys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthElys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipElys(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, ErrIntOverflowElys + } + 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, ErrIntOverflowElys + } + 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, ErrIntOverflowElys + } + 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, ErrInvalidLengthElys + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupElys + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthElys + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthElys = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowElys = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupElys = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go index 9a7d0062..47b64037 100644 --- a/x/oracle/types/errors.go +++ b/x/oracle/types/errors.go @@ -37,5 +37,11 @@ var ( 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") + ErrNonEqualInjPoolID = errors.Register(ModuleName, 30, "pool ids in injected and generated external liquidity asset deoth info are not equal") //nolint: lll + ErrInvalidAssetDepthLen = errors.Register(ModuleName, 31, "invalid asset depth info length") + ErrNonEqualAssetDepth = errors.Register(ModuleName, 32, "injected asset deoth info and generated asset deoth info are not equal") //nolint: lll + ErrNoCommitInfo = errors.Register(ModuleName, 33, "no commit info in process proposal request") + ErrNotAPriceFeeder = errors.Register(ModuleName, 34, "not a price feeder") + ErrPriceFeederNotActive = errors.Register(ModuleName, 35, "price feeder is not active") + ErrAssetWasCreated = errors.Register(ModuleName, 36, "asset already exists") ) diff --git a/x/oracle/types/events.pb.go b/x/oracle/types/events.pb.go index 310628df..2941b02d 100644 --- a/x/oracle/types/events.pb.go +++ b/x/oracle/types/events.pb.go @@ -107,35 +107,81 @@ func (m *EventSetFxRate) XXX_DiscardUnknown() { var xxx_messageInfo_EventSetFxRate proto.InternalMessageInfo +// EventSetFxRateVote is emitted on exchange rate vote update +type EventSetFxRateVote 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"` + // Validator address submitting the vote + Validator string `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (m *EventSetFxRateVote) Reset() { *m = EventSetFxRateVote{} } +func (m *EventSetFxRateVote) String() string { return proto.CompactTextString(m) } +func (*EventSetFxRateVote) ProtoMessage() {} +func (*EventSetFxRateVote) Descriptor() ([]byte, []int) { + return fileDescriptor_6b8914220a86f2fd, []int{2} +} +func (m *EventSetFxRateVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetFxRateVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetFxRateVote.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 *EventSetFxRateVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetFxRateVote.Merge(m, src) +} +func (m *EventSetFxRateVote) XXX_Size() int { + return m.Size() +} +func (m *EventSetFxRateVote) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetFxRateVote.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetFxRateVote proto.InternalMessageInfo + func init() { proto.RegisterType((*EventDelegateFeedConsent)(nil), "ojo.oracle.v1.EventDelegateFeedConsent") proto.RegisterType((*EventSetFxRate)(nil), "ojo.oracle.v1.EventSetFxRate") + proto.RegisterType((*EventSetFxRateVote)(nil), "ojo.oracle.v1.EventSetFxRateVote") } func init() { proto.RegisterFile("ojo/oracle/v1/events.proto", fileDescriptor_6b8914220a86f2fd) } var fileDescriptor_6b8914220a86f2fd = []byte{ - // 316 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbd, 0x4e, 0x3a, 0x41, - 0x14, 0xc5, 0x77, 0xff, 0xf9, 0x6b, 0x74, 0x12, 0x2d, 0x36, 0x14, 0x2b, 0x26, 0x83, 0xa1, 0xd2, - 0x82, 0x9d, 0x10, 0x7d, 0x01, 0x11, 0xb0, 0xb1, 0x5a, 0x3a, 0x1b, 0xb3, 0xec, 0xdc, 0x0c, 0x5f, - 0x3b, 0x97, 0xcc, 0x5c, 0x11, 0x5e, 0xc0, 0xda, 0x87, 0xe1, 0x21, 0x28, 0x09, 0x95, 0xb1, 0x20, - 0x0a, 0x2f, 0x62, 0x76, 0x07, 0xb4, 0xb4, 0xbb, 0x1f, 0xe7, 0xfc, 0xce, 0x64, 0x2e, 0x2b, 0xe3, - 0x00, 0x05, 0x9a, 0x24, 0x1d, 0x81, 0x98, 0xd4, 0x05, 0x4c, 0x40, 0x93, 0x8d, 0xc6, 0x06, 0x09, - 0x83, 0x13, 0x1c, 0x60, 0xe4, 0x76, 0xd1, 0xa4, 0x5e, 0x3e, 0x4b, 0xd1, 0x66, 0x68, 0x9f, 0x8a, - 0xa5, 0x70, 0x8d, 0x53, 0x96, 0x4b, 0x0a, 0x15, 0xba, 0x79, 0x5e, 0xb9, 0x69, 0xf5, 0xd5, 0x67, - 0x61, 0x2b, 0x07, 0x36, 0x61, 0x04, 0x2a, 0x21, 0x68, 0x03, 0xc8, 0x3b, 0xd4, 0x16, 0x34, 0x05, - 0x37, 0xec, 0x08, 0xc7, 0x60, 0x12, 0x42, 0x13, 0xfa, 0x17, 0xfe, 0xe5, 0x71, 0x23, 0x5c, 0xcd, - 0x6b, 0xa5, 0x1d, 0xf6, 0x56, 0x4a, 0x03, 0xd6, 0x76, 0xc8, 0xf4, 0xb5, 0x8a, 0x7f, 0x94, 0xb9, - 0x4b, 0xee, 0x60, 0xe1, 0xbf, 0xbf, 0x5c, 0x7b, 0x65, 0x35, 0x63, 0xa7, 0xc5, 0x3b, 0x3a, 0x40, - 0xed, 0x69, 0x9c, 0x10, 0x04, 0x25, 0x76, 0x20, 0x41, 0x63, 0xe6, 0xa2, 0x63, 0xd7, 0x04, 0x2d, - 0xf6, 0xdf, 0xfc, 0x92, 0xeb, 0x8b, 0x75, 0xc5, 0xfb, 0x58, 0x57, 0xce, 0x1d, 0xdd, 0xca, 0x61, - 0xd4, 0x47, 0x91, 0x25, 0xd4, 0x8b, 0x1e, 0x40, 0x25, 0xe9, 0xac, 0x09, 0xe9, 0x6a, 0x5e, 0x63, - 0xbb, 0xf0, 0x26, 0xa4, 0x71, 0x61, 0x6f, 0xdc, 0x2f, 0xbe, 0xb8, 0xb7, 0xd8, 0x70, 0x7f, 0xb9, - 0xe1, 0xfe, 0xe7, 0x86, 0xfb, 0x6f, 0x5b, 0xee, 0x2d, 0xb7, 0xdc, 0x7b, 0xdf, 0x72, 0xef, 0xf1, - 0x4a, 0xf5, 0xa9, 0xf7, 0xdc, 0x8d, 0x52, 0xcc, 0x04, 0x0e, 0xb0, 0xa6, 0x81, 0x5e, 0xd0, 0x0c, - 0xf3, 0x5a, 0x4c, 0xf7, 0xa7, 0xa0, 0xd9, 0x18, 0x6c, 0xf7, 0xb0, 0xf8, 0xc7, 0xeb, 0xef, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x4c, 0xc9, 0x11, 0xac, 0xa5, 0x01, 0x00, 0x00, + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0x3f, 0x4f, 0xfa, 0x40, + 0x18, 0xc7, 0xdb, 0xdf, 0x1f, 0x23, 0x97, 0xe8, 0xd0, 0x30, 0x54, 0x4c, 0x0e, 0xc3, 0xa4, 0x03, + 0xbd, 0x10, 0x8d, 0xbb, 0x08, 0xb8, 0x38, 0x95, 0xc4, 0xc1, 0xc5, 0x1c, 0xbd, 0x27, 0xa5, 0x40, + 0xfb, 0x90, 0xbb, 0xb3, 0xc2, 0x1b, 0x70, 0xf6, 0x6d, 0xb8, 0xf3, 0x22, 0x18, 0x09, 0x93, 0x71, + 0x20, 0x0a, 0x6f, 0xc4, 0xb4, 0x07, 0x12, 0x27, 0x26, 0xb7, 0xe7, 0xcf, 0xf7, 0xfb, 0xf9, 0x36, + 0x4f, 0x8f, 0x94, 0xb0, 0x87, 0x0c, 0x25, 0x0f, 0x06, 0xc0, 0xd2, 0x1a, 0x83, 0x14, 0x12, 0xad, + 0xbc, 0xa1, 0x44, 0x8d, 0xce, 0x01, 0xf6, 0xd0, 0x33, 0x3b, 0x2f, 0xad, 0x95, 0x8e, 0x02, 0x54, + 0x31, 0xaa, 0x87, 0x7c, 0xc9, 0x4c, 0x63, 0x94, 0xa5, 0x62, 0x88, 0x21, 0x9a, 0x79, 0x56, 0x99, + 0x69, 0xe5, 0xd9, 0x26, 0x6e, 0x33, 0x03, 0x36, 0x60, 0x00, 0x21, 0xd7, 0xd0, 0x02, 0x10, 0xd7, + 0x98, 0x28, 0x48, 0xb4, 0x73, 0x41, 0xf6, 0x71, 0x08, 0x92, 0x6b, 0x94, 0xae, 0x7d, 0x62, 0x9f, + 0x16, 0xea, 0xee, 0x7c, 0x52, 0x2d, 0xae, 0xb1, 0x57, 0x42, 0x48, 0x50, 0xaa, 0xad, 0x65, 0x94, + 0x84, 0xfe, 0xb7, 0x32, 0x73, 0x89, 0x35, 0xcc, 0xfd, 0xb3, 0xcb, 0xb5, 0x51, 0x56, 0x62, 0x72, + 0x98, 0x7f, 0x47, 0x1b, 0x74, 0x6b, 0xe4, 0x73, 0x0d, 0x4e, 0x91, 0xfc, 0x17, 0x90, 0x60, 0x6c, + 0xa2, 0x7d, 0xd3, 0x38, 0x4d, 0xf2, 0x4f, 0x6e, 0xc9, 0xb5, 0xe9, 0xa2, 0x6c, 0xbd, 0x2f, 0xca, + 0xc7, 0x86, 0xae, 0x44, 0xdf, 0x8b, 0x90, 0xc5, 0x5c, 0x77, 0xbd, 0x5b, 0x08, 0x79, 0x30, 0x6e, + 0x40, 0x30, 0x9f, 0x54, 0xc9, 0x3a, 0xbc, 0x01, 0x81, 0x9f, 0xdb, 0x2b, 0xaf, 0x36, 0x71, 0x7e, + 0xe6, 0xdd, 0xe1, 0x2f, 0x67, 0x3a, 0x97, 0xa4, 0x90, 0xf2, 0x41, 0x24, 0xf2, 0x7b, 0xfe, 0xdd, + 0x71, 0x99, 0xad, 0xb4, 0x7e, 0x33, 0xfd, 0xa4, 0xd6, 0x74, 0x49, 0xed, 0xd9, 0x92, 0xda, 0x1f, + 0x4b, 0x6a, 0xbf, 0xac, 0xa8, 0x35, 0x5b, 0x51, 0xeb, 0x6d, 0x45, 0xad, 0xfb, 0xb3, 0x30, 0xd2, + 0xdd, 0xc7, 0x8e, 0x17, 0x60, 0xcc, 0xb0, 0x87, 0xd5, 0x04, 0xf4, 0x13, 0xca, 0x7e, 0x56, 0xb3, + 0xd1, 0xe6, 0xd9, 0xe8, 0xf1, 0x10, 0x54, 0x67, 0x2f, 0xff, 0xe7, 0xe7, 0x5f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x4b, 0x89, 0x82, 0x0f, 0x51, 0x02, 0x00, 0x00, } func (m *EventDelegateFeedConsent) Marshal() (dAtA []byte, err error) { @@ -215,6 +261,53 @@ func (m *EventSetFxRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventSetFxRateVote) 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 *EventSetFxRateVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetFxRateVote) 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 = encodeVarintEvents(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0x1a + } + { + 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 @@ -258,6 +351,25 @@ func (m *EventSetFxRate) Size() (n int) { return n } +func (m *EventSetFxRateVote) 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)) + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -494,6 +606,154 @@ func (m *EventSetFxRate) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventSetFxRateVote) 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: EventSetFxRateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetFxRateVote: 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 + 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 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.Validator = 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 skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go index 9e3879ad..80b7dba0 100644 --- a/x/oracle/types/expected_keeper.go +++ b/x/oracle/types/expected_keeper.go @@ -4,11 +4,8 @@ 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" - gasestimatetypes "github.com/ojo-network/ojo/x/gasestimate/types" ) // StakingKeeper defines the expected interface contract defined by the x/staking @@ -16,21 +13,9 @@ import ( 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 { @@ -45,12 +30,4 @@ type AccountKeeper interface { // 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 GasEstimateKeeper interface { - GetParams(ctx sdk.Context) (params gasestimatetypes.Params) } diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index 6091fc17..4d8e05a5 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -36,6 +36,9 @@ type GenesisState struct { 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"` + AssetInfos []AssetInfo `protobuf:"bytes,10,rep,name=asset_infos,json=assetInfos,proto3" json:"asset_infos"` + Prices []Price `protobuf:"bytes,11,rep,name=prices,proto3" json:"prices"` + PriceFeeders []PriceFeeder `protobuf:"bytes,12,rep,name=price_feeders,json=priceFeeders,proto3" json:"price_feeders"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -161,43 +164,48 @@ func init() { func init() { proto.RegisterFile("ojo/oracle/v1/genesis.proto", fileDescriptor_88726d9a54067831) } var fileDescriptor_88726d9a54067831 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x30, - 0x1c, 0x6f, 0xb6, 0xd1, 0x31, 0x77, 0x1d, 0x9b, 0x05, 0x52, 0x28, 0x2c, 0x1b, 0x93, 0x90, 0x86, - 0xaa, 0x25, 0xea, 0x7a, 0xe2, 0xb8, 0xae, 0x63, 0x1c, 0x40, 0x9a, 0x3a, 0xc4, 0x01, 0x09, 0x45, - 0x6e, 0xe2, 0xa6, 0xee, 0x9a, 0x38, 0xf8, 0xef, 0x95, 0xc2, 0x53, 0xf0, 0x00, 0x3c, 0x01, 0x4f, - 0xd2, 0xe3, 0x8e, 0x9c, 0xf8, 0x68, 0x5f, 0x04, 0xc5, 0x4e, 0xfa, 0x11, 0x6d, 0xa8, 0xa7, 0x46, - 0xff, 0xdf, 0x97, 0x7f, 0xd5, 0xdf, 0x46, 0x4f, 0x78, 0x8f, 0x3b, 0x5c, 0x10, 0xaf, 0x4f, 0x9d, - 0x41, 0xcd, 0x09, 0x68, 0x44, 0x81, 0x81, 0x1d, 0x0b, 0x2e, 0x39, 0x2e, 0xf3, 0x1e, 0xb7, 0x35, - 0x68, 0x0f, 0x6a, 0x95, 0x87, 0x01, 0x0f, 0xb8, 0x42, 0x9c, 0xe4, 0x4b, 0x93, 0x2a, 0x95, 0x45, - 0x87, 0x94, 0xae, 0x31, 0xcb, 0xe3, 0x10, 0x72, 0x70, 0xda, 0x04, 0x12, 0xb0, 0x4d, 0x25, 0xa9, - 0x39, 0x1e, 0x67, 0x91, 0xc6, 0x0f, 0xbe, 0x17, 0xd1, 0xe6, 0xb9, 0x8e, 0xbc, 0x94, 0x44, 0x52, - 0x5c, 0x47, 0xc5, 0x98, 0x08, 0x12, 0x82, 0x69, 0xec, 0x1b, 0x87, 0xa5, 0xe3, 0x47, 0xf6, 0xc2, - 0x11, 0xec, 0x0b, 0x05, 0x36, 0xd6, 0x46, 0xbf, 0xf6, 0x0a, 0xad, 0x94, 0x8a, 0xdf, 0x21, 0xdc, - 0xa1, 0xd4, 0xa7, 0xc2, 0xf5, 0x69, 0x9f, 0x06, 0x44, 0x32, 0x1e, 0x81, 0xb9, 0xb2, 0xbf, 0x7a, - 0x58, 0x3a, 0xde, 0xcb, 0x19, 0xbc, 0x52, 0xc4, 0xe6, 0x94, 0x97, 0x5a, 0xed, 0x74, 0x72, 0x73, - 0xc0, 0x43, 0xb4, 0x45, 0x87, 0x5e, 0x97, 0x44, 0x01, 0x75, 0x05, 0x91, 0x14, 0xcc, 0x55, 0xe5, - 0xf8, 0xd4, 0xd6, 0xa5, 0xec, 0xa4, 0x94, 0x9d, 0x96, 0xb2, 0x9b, 0xd4, 0x3b, 0xe5, 0x2c, 0x6a, - 0xd4, 0x13, 0xbb, 0x1f, 0xbf, 0xf7, 0xaa, 0x01, 0x93, 0xdd, 0xeb, 0xb6, 0xed, 0xf1, 0xd0, 0x49, - 0xff, 0x04, 0xfd, 0x73, 0x04, 0xfe, 0x95, 0x23, 0xbf, 0xc4, 0x14, 0x32, 0x0d, 0xb4, 0xca, 0x59, - 0x50, 0x2b, 0xc9, 0xc1, 0x67, 0xa8, 0x1c, 0x32, 0x00, 0xd7, 0xe3, 0xd7, 0x91, 0xa4, 0x02, 0xcc, - 0x35, 0x15, 0x5c, 0xc9, 0x55, 0x79, 0xcb, 0x00, 0x4e, 0x35, 0x25, 0x6d, 0xb1, 0x19, 0xce, 0x46, - 0x80, 0xbf, 0xa2, 0x7d, 0x12, 0x04, 0x22, 0x29, 0x44, 0xdd, 0x85, 0x2a, 0x6e, 0x2c, 0xe8, 0x80, - 0x27, 0x95, 0xee, 0x29, 0xe7, 0x6a, 0xce, 0xf9, 0x24, 0x93, 0x9d, 0xcd, 0x9d, 0xeb, 0x42, 0x6b, - 0xd2, 0xa8, 0x5d, 0xf2, 0x1f, 0x0e, 0xe0, 0x4f, 0x68, 0xf7, 0xae, 0x6c, 0x1d, 0x5c, 0x54, 0xc1, - 0x87, 0xcb, 0x04, 0xbf, 0x9f, 0xa5, 0x56, 0xc8, 0x5d, 0x04, 0xc0, 0x2f, 0xd1, 0x7a, 0x48, 0x7d, - 0x46, 0x22, 0x30, 0xd7, 0x95, 0xf9, 0xe3, 0xfc, 0xee, 0x08, 0xe6, 0xd1, 0x4b, 0x49, 0xc2, 0x38, - 0x75, 0xcb, 0xf8, 0xf8, 0x35, 0x7a, 0xd0, 0x65, 0x20, 0xb9, 0x60, 0x9e, 0x1b, 0x27, 0x2c, 0x30, - 0xef, 0x2f, 0x67, 0xb1, 0x95, 0xe9, 0x14, 0x02, 0xf8, 0x0d, 0xda, 0xd1, 0xa6, 0xae, 0x4f, 0x07, - 0x2c, 0xdd, 0xc4, 0x8d, 0xe5, 0xbc, 0xb6, 0xb5, 0xb2, 0x39, 0x15, 0x1e, 0x74, 0xd0, 0x76, 0x7e, - 0x5f, 0xf1, 0x73, 0xb4, 0x95, 0x2e, 0x3b, 0xf1, 0x7d, 0x41, 0x41, 0xdf, 0x94, 0x8d, 0x56, 0x59, - 0x4f, 0x4f, 0xf4, 0x10, 0x57, 0xd1, 0xce, 0x80, 0xf4, 0x99, 0x4f, 0x24, 0x9f, 0x31, 0x57, 0x14, - 0x73, 0x7b, 0x0a, 0xa4, 0xe4, 0x83, 0x8f, 0xa8, 0x34, 0xb7, 0x4c, 0xb7, 0x6b, 0x8d, 0xdb, 0xb5, - 0xf8, 0x19, 0xda, 0x9c, 0x5f, 0x56, 0x95, 0xb1, 0xd6, 0x2a, 0xcd, 0x6d, 0x62, 0xe3, 0x7c, 0xf4, - 0xd7, 0x2a, 0x8c, 0xc6, 0x96, 0x71, 0x33, 0xb6, 0x8c, 0x3f, 0x63, 0xcb, 0xf8, 0x36, 0xb1, 0x0a, - 0x37, 0x13, 0xab, 0xf0, 0x73, 0x62, 0x15, 0x3e, 0xbc, 0x98, 0xbb, 0x29, 0xbc, 0xc7, 0x8f, 0x22, - 0x2a, 0x3f, 0x73, 0x71, 0x95, 0x7c, 0x3b, 0xc3, 0xec, 0x61, 0x51, 0x17, 0xa6, 0x5d, 0x54, 0xaf, - 0x46, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0x32, 0x61, 0xa8, 0xb5, 0x04, 0x00, 0x00, + // 644 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdb, 0x4e, 0xd4, 0x40, + 0x18, 0xde, 0x05, 0x5c, 0x64, 0x76, 0x17, 0x61, 0x82, 0x49, 0xad, 0x52, 0x90, 0xc4, 0x04, 0x43, + 0x68, 0x03, 0x5c, 0x79, 0x65, 0x38, 0x89, 0x26, 0x9a, 0x90, 0xc5, 0x78, 0x61, 0x62, 0x9a, 0xd9, + 0xf6, 0xdf, 0x32, 0xb0, 0xed, 0xd4, 0xfe, 0xc3, 0x0a, 0x3e, 0x85, 0xcf, 0xe1, 0x93, 0x70, 0xc9, + 0x25, 0x57, 0x1e, 0xe0, 0x45, 0x4c, 0x67, 0xa6, 0x7b, 0x68, 0x16, 0xc3, 0xd5, 0x4e, 0xfe, 0xff, + 0x3b, 0xcc, 0xb7, 0x99, 0xaf, 0xe4, 0xa9, 0x38, 0x11, 0x9e, 0xc8, 0x58, 0xd0, 0x05, 0xaf, 0xb7, + 0xe1, 0x45, 0x90, 0x00, 0x72, 0x74, 0xd3, 0x4c, 0x48, 0x41, 0x9b, 0xe2, 0x44, 0xb8, 0x7a, 0xe9, + 0xf6, 0x36, 0xec, 0x85, 0x48, 0x44, 0x42, 0x6d, 0xbc, 0xfc, 0xa4, 0x41, 0xb6, 0x3d, 0xaa, 0x60, + 0xe0, 0x7a, 0x67, 0x8d, 0xee, 0xa0, 0x7b, 0x61, 0xa4, 0x6d, 0x27, 0x10, 0x18, 0x0b, 0xf4, 0xda, + 0x0c, 0xf3, 0x55, 0x1b, 0x24, 0xdb, 0xf0, 0x02, 0xc1, 0x13, 0xbd, 0x5f, 0xb9, 0x9e, 0x26, 0x8d, + 0x03, 0x7d, 0x99, 0x23, 0xc9, 0x24, 0xd0, 0x2d, 0x52, 0x4b, 0x59, 0xc6, 0x62, 0xb4, 0xaa, 0xcb, + 0xd5, 0xd5, 0xfa, 0xe6, 0x63, 0x77, 0xe4, 0x72, 0xee, 0xa1, 0x5a, 0xee, 0x4c, 0x5d, 0xfe, 0x5a, + 0xaa, 0xb4, 0x0c, 0x94, 0x7e, 0x24, 0xb4, 0x03, 0x10, 0x42, 0xe6, 0x87, 0xd0, 0x85, 0x88, 0x49, + 0x2e, 0x12, 0xb4, 0x26, 0x96, 0x27, 0x57, 0xeb, 0x9b, 0x4b, 0x25, 0x81, 0x37, 0x0a, 0xb8, 0xd7, + 0xc7, 0x19, 0xa9, 0xf9, 0x4e, 0x69, 0x8e, 0xf4, 0x9c, 0xcc, 0xc2, 0x79, 0x70, 0xcc, 0x92, 0x08, + 0xfc, 0x8c, 0x49, 0x40, 0x6b, 0x52, 0x29, 0x3e, 0x73, 0x75, 0x28, 0x37, 0x0f, 0xe5, 0x9a, 0x50, + 0xee, 0x1e, 0x04, 0xbb, 0x82, 0x27, 0x3b, 0x5b, 0xb9, 0xdc, 0xcf, 0xdf, 0x4b, 0x6b, 0x11, 0x97, + 0xc7, 0x67, 0x6d, 0x37, 0x10, 0xb1, 0x67, 0xfe, 0x04, 0xfd, 0xb3, 0x8e, 0xe1, 0xa9, 0x27, 0x2f, + 0x52, 0xc0, 0x82, 0x83, 0xad, 0x66, 0x61, 0xd4, 0xca, 0x7d, 0xe8, 0x3e, 0x69, 0xc6, 0x1c, 0xd1, + 0x0f, 0xc4, 0x59, 0x22, 0x21, 0x43, 0x6b, 0x4a, 0x19, 0xdb, 0xa5, 0x28, 0x1f, 0x38, 0xe2, 0xae, + 0x86, 0x98, 0x14, 0x8d, 0x78, 0x30, 0x42, 0xfa, 0x9d, 0x2c, 0xb3, 0x28, 0xca, 0xf2, 0x40, 0xe0, + 0x8f, 0x44, 0xf1, 0xd3, 0x0c, 0x7a, 0x22, 0x8f, 0xf4, 0x40, 0x29, 0xaf, 0x95, 0x94, 0xb7, 0x0b, + 0xda, 0xfe, 0xd0, 0xbd, 0x0e, 0x35, 0xc7, 0x58, 0x2d, 0xb2, 0xff, 0x60, 0x90, 0x7e, 0x25, 0x8b, + 0x77, 0x79, 0x6b, 0xe3, 0x9a, 0x32, 0x5e, 0xbd, 0x8f, 0xf1, 0xa7, 0x81, 0xab, 0xcd, 0xee, 0x02, + 0x20, 0x7d, 0x45, 0xa6, 0x63, 0x08, 0x39, 0x4b, 0xd0, 0x9a, 0x56, 0xe2, 0x4f, 0xca, 0x6f, 0x27, + 0xe3, 0x01, 0x1c, 0x49, 0x16, 0xa7, 0x46, 0xad, 0xc0, 0xd3, 0xb7, 0xe4, 0xd1, 0x31, 0x47, 0x29, + 0x32, 0x1e, 0xf8, 0x69, 0x8e, 0x42, 0xeb, 0xe1, 0xfd, 0x24, 0x66, 0x0b, 0x9e, 0xda, 0x20, 0x7d, + 0x4f, 0xe6, 0xb5, 0xa8, 0x1f, 0x42, 0x8f, 0x9b, 0x97, 0x38, 0x73, 0x3f, 0xad, 0x39, 0xcd, 0xdc, + 0xeb, 0x13, 0xe9, 0x6b, 0x52, 0x67, 0x88, 0x20, 0x7d, 0x9e, 0x74, 0x04, 0x5a, 0x44, 0xe9, 0x58, + 0xe5, 0xff, 0x2c, 0x47, 0xbc, 0x4b, 0x3a, 0xc2, 0xc8, 0x10, 0x56, 0x0c, 0x90, 0x6e, 0x92, 0x9a, + 0xc9, 0x53, 0x57, 0xdc, 0x85, 0x71, 0x77, 0xe8, 0xb7, 0x49, 0x47, 0xd8, 0x27, 0x4d, 0x75, 0xf2, + 0x75, 0x25, 0xd0, 0x6a, 0x8c, 0x7d, 0x7d, 0x8a, 0xaa, 0xdb, 0x54, 0xbc, 0xbe, 0x74, 0x30, 0xc2, + 0x95, 0x0e, 0x99, 0x2b, 0x77, 0x8d, 0xbe, 0x20, 0xb3, 0xa6, 0xa8, 0x2c, 0x0c, 0x33, 0x40, 0xdd, + 0xf2, 0x99, 0x56, 0x53, 0x4f, 0xb7, 0xf5, 0x90, 0xae, 0x91, 0xf9, 0x1e, 0xeb, 0xf2, 0x90, 0x49, + 0x31, 0x40, 0x4e, 0x28, 0xe4, 0x5c, 0x7f, 0x61, 0xc0, 0x2b, 0x5f, 0x48, 0x7d, 0xa8, 0x08, 0xe3, + 0xb9, 0xd5, 0xf1, 0x5c, 0xfa, 0x9c, 0x34, 0x86, 0x8b, 0xa6, 0x3c, 0xa6, 0x5a, 0xf5, 0xa1, 0x16, + 0xed, 0x1c, 0x5c, 0xfe, 0x75, 0x2a, 0x97, 0x37, 0x4e, 0xf5, 0xea, 0xc6, 0xa9, 0xfe, 0xb9, 0x71, + 0xaa, 0x3f, 0x6e, 0x9d, 0xca, 0xd5, 0xad, 0x53, 0xb9, 0xbe, 0x75, 0x2a, 0x9f, 0x5f, 0x0e, 0xb5, + 0x5c, 0x9c, 0x88, 0xf5, 0x04, 0xe4, 0x37, 0x91, 0x9d, 0xe6, 0x67, 0xef, 0xbc, 0xf8, 0x24, 0xaa, + 0xb2, 0xb7, 0x6b, 0xea, 0x8b, 0xb7, 0xf5, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x21, 0xd8, 0xec, 0x79, + 0x8b, 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -220,6 +228,48 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PriceFeeders) > 0 { + for iNdEx := len(m.PriceFeeders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PriceFeeders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Prices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.AssetInfos) > 0 { + for iNdEx := len(m.AssetInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AssetInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } if len(m.MedianDeviations) > 0 { for iNdEx := len(m.MedianDeviations) - 1; iNdEx >= 0; iNdEx-- { { @@ -484,6 +534,24 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.AssetInfos) > 0 { + for _, e := range m.AssetInfos { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.PriceFeeders) > 0 { + for _, e := range m.PriceFeeders { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -860,6 +928,108 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetInfos", 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.AssetInfos = append(m.AssetInfos, AssetInfo{}) + if err := m.AssetInfos[len(m.AssetInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Prices", 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.Prices = append(m.Prices, Price{}) + if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceFeeders", 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.PriceFeeders = append(m.PriceFeeders, PriceFeeder{}) + if err := m.PriceFeeders[len(m.PriceFeeders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go index 6a01481e..3a60cf1a 100644 --- a/x/oracle/types/keys.go +++ b/x/oracle/types/keys.go @@ -35,6 +35,11 @@ var ( 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 + KeyPrefixPrice = []byte{0x11} // prefix for each key to a price + KeyPrefixPriceFeeder = []byte{0x12} // prefix for each key to a price feeder + KeyPrefixAssetInfo = []byte{0x13} // prefix for each key to a asset info + KeyPrefixPool = []byte{0x14} // prefix for each key to a pool + KeyPrefixAccountedPool = []byte{0x15} // prefix for each key to an accounted pool ) // GetExchangeRateKey - stored by *denom* @@ -51,9 +56,8 @@ func GetFeederDelegationKey(v sdk.ValAddress) (key []byte) { } // GetMissCounterKey - stored by *Validator* address -func GetMissCounterKey(v sdk.ValAddress) (key []byte) { - key = append(key, KeyPrefixMissCounter...) - return append(key, address.MustLengthPrefix(v)...) +func GetMissCounterKey(v string) (key []byte) { + return util.ConcatBytes(0, KeyPrefixMissCounter, []byte(v)) } // GetAggregateExchangeRatePrevoteKey - stored by *Validator* address @@ -63,9 +67,8 @@ func GetAggregateExchangeRatePrevoteKey(v sdk.ValAddress) (key []byte) { } // GetAggregateExchangeRateVoteKey - stored by *Validator* address -func GetAggregateExchangeRateVoteKey(v sdk.ValAddress) (key []byte) { - key = append(key, KeyPrefixAggregateExchangeRateVote...) - return append(key, address.MustLengthPrefix(v)...) +func GetAggregateExchangeRateVoteKey(v string) (key []byte) { + return util.ConcatBytes(0, KeyPrefixAggregateExchangeRateVote, []byte(v)) } // KeyMedian - stored by *denom* @@ -93,6 +96,36 @@ func KeyParamUpdatePlan(planHeight uint64) (key []byte) { return util.ConcatBytes(0, KeyPrefixParamUpdatePlan, util.UintWithNullPrefix(planHeight)) } +// KeyPrice - stored by *asset, source, and timestamp* +func KeyPrice(asset string, timestamp uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixPrice, []byte(asset), util.UintWithNullPrefix(timestamp)) +} + +// KeyPriceAsset - stored by *asset* +func KeyPriceAsset(asset string) (key []byte) { + return util.ConcatBytes(0, KeyPrefixPrice, []byte(asset)) +} + +// KeyAssetInfo - stored by *asset* +func KeyAssetInfo(asset string) (key []byte) { + return util.ConcatBytes(0, KeyPrefixAssetInfo, []byte(asset)) +} + +// KeyPriceFeeder - stored by *address* +func KeyPriceFeeder(address string) (key []byte) { + return util.ConcatBytes(0, KeyPrefixPriceFeeder, []byte(address)) +} + +// KeyPool - stored by *poolID* +func KeyPool(poolID uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixPool, util.UintWithNullPrefix(poolID)) +} + +// KeyAccountedPool - stored by *poolID* +func KeyAccountedPool(poolID uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixAccountedPool, util.UintWithNullPrefix(poolID)) +} + // 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) { diff --git a/x/oracle/types/keys_test.go b/x/oracle/types/keys_test.go index a9d7bf2a..c937c7ad 100644 --- a/x/oracle/types/keys_test.go +++ b/x/oracle/types/keys_test.go @@ -62,12 +62,12 @@ func TestGetMissCounterKey(t *testing.T) { }{ { 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}, + expectedKey: []byte{0x3, 0x6f, 0x6a, 0x6f, 0x76, 0x61, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6a, 0x6c, 0x74, 0x61, 0x30, 0x34, 0x37, 0x68, 0x36, 0x6c, 0x74, 0x61, 0x30, 0x34, 0x37, 0x68, 0x36, 0x6c, 0x74, 0x61, 0x30, 0x34, 0x37, 0x68, 0x36, 0x6c, 0x38, 0x64, 0x67, 0x38, 0x6d, 0x66}, }, } for i, testCase := range testCases { - actualKey := types.GetMissCounterKey(testCase.val) + actualKey := types.GetMissCounterKey(testCase.val.String()) require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) } } @@ -98,12 +98,12 @@ func TestGetAggregateExchangeRateVoteKey(t *testing.T) { }{ { 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}, + expectedKey: []byte{0x5, 0x6f, 0x6a, 0x6f, 0x76, 0x61, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x31, 0x76, 0x39, 0x6a, 0x78, 0x67, 0x75, 0x6a, 0x6c, 0x74, 0x61, 0x30, 0x34, 0x37, 0x68, 0x36, 0x6c, 0x74, 0x61, 0x30, 0x34, 0x37, 0x68, 0x36, 0x6c, 0x74, 0x61, 0x30, 0x34, 0x37, 0x68, 0x36, 0x6c, 0x38, 0x64, 0x67, 0x38, 0x6d, 0x66}, }, } for i, testCase := range testCases { - actualKey := types.GetAggregateExchangeRateVoteKey(testCase.val) + actualKey := types.GetAggregateExchangeRateVoteKey(testCase.val.String()) require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) } } diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index 00d01c47..316bf5c5 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -267,6 +267,11 @@ func (msg MsgLegacyGovUpdateParams) ValidateBasic() error { return err } + case string(KeyExternalLiquidityPeriod): + if err := validateExternalLiquidityPeriod(msg.Changes.ExternalLiquidityPeriod); err != nil { + return err + } + default: return fmt.Errorf("%s is not an existing oracle param key", key) } diff --git a/x/oracle/types/msgs_test.go b/x/oracle/types/msgs_test.go index f247ea79..db1438b6 100644 --- a/x/oracle/types/msgs_test.go +++ b/x/oracle/types/msgs_test.go @@ -90,7 +90,7 @@ func TestMsgAggregateExchangeRateVote(t *testing.T) { validSalt := "0cf33fb528b388660c3a42c3f3250e983395290b75fef255050fb5bc48a6025f" saltWithColon := "0cf33fb528b388660c3a42c3f3250e983395290b75fef255050fb5bc48a6025:" msgInvalidSalt := "invalid salt length; must be 64" - msgInvalidOverflowValue := "out of range; bitLen:" + 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" diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 80d3a751..8639f205 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -56,6 +56,8 @@ type Params struct { // 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"` + // Number of blocks between updating external liquidity information. + ExternalLiquidityPeriod uint64 `protobuf:"varint,16,opt,name=external_liquidity_period,json=externalLiquidityPeriod,proto3" json:"external_liquidity_period,omitempty" yaml:"external_liquidity_period"` } func (m *Params) Reset() { *m = Params{} } @@ -332,10 +334,15 @@ 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"` + 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"` + BaseProxyDenom string `protobuf:"bytes,3,opt,name=base_proxy_denom,json=baseProxyDenom,proto3" json:"base_proxy_denom,omitempty" yaml:"base_proxy_denom"` + QuoteProxyDenom string `protobuf:"bytes,4,opt,name=quote_proxy_denom,json=quoteProxyDenom,proto3" json:"quote_proxy_denom,omitempty" yaml:"quote_proxy_denom"` + PoolId uint64 `protobuf:"varint,5,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + ExternLiquidityProvider string `protobuf:"bytes,6,opt,name=extern_liquidity_provider,json=externLiquidityProvider,proto3" json:"extern_liquidity_provider,omitempty" yaml:"extern_liquidity_provider"` + CryptoCompareExchange string `protobuf:"bytes,7,opt,name=crypto_compare_exchange,json=cryptoCompareExchange,proto3" json:"crypto_compare_exchange,omitempty" yaml:"crypto_compare_exchange"` + PairAddress []PairAddressProvider `protobuf:"bytes,8,rep,name=pair_address,json=pairAddress,proto3" json:"pair_address" yaml:"pair_address"` + Providers []string `protobuf:"bytes,9,rep,name=providers,proto3" json:"providers,omitempty" yaml:"providers"` } func (m *CurrencyPairProviders) Reset() { *m = CurrencyPairProviders{} } @@ -509,92 +516,103 @@ func init() { func init() { proto.RegisterFile("ojo/oracle/v1/oracle.proto", fileDescriptor_e2b9fb194216b28f) } var fileDescriptor_e2b9fb194216b28f = []byte{ - // 1348 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xbf, 0x73, 0x1b, 0xc5, - 0x17, 0xd7, 0xc5, 0x8a, 0x63, 0x3d, 0x49, 0x76, 0xb2, 0xb6, 0x93, 0x8b, 0x9d, 0xaf, 0xce, 0xdf, - 0x23, 0x80, 0x03, 0x44, 0x22, 0x0e, 0x4c, 0x06, 0x0f, 0x14, 0xb9, 0x98, 0xd0, 0x84, 0x8c, 0xe6, - 0x0c, 0x61, 0x26, 0x05, 0x37, 0xab, 0xbb, 0x45, 0xba, 0x58, 0x77, 0x2b, 0x76, 0x4f, 0xb2, 0xd5, - 0x52, 0x31, 0x43, 0x01, 0x05, 0x05, 0x65, 0x68, 0x33, 0x54, 0xcc, 0x30, 0x43, 0x43, 0x9f, 0x19, - 0x9a, 0x94, 0x0c, 0xc5, 0x05, 0x92, 0x86, 0x5a, 0x7f, 0x01, 0xb3, 0x3f, 0x4e, 0x3a, 0x29, 0x32, - 0x84, 0x54, 0xda, 0xb7, 0x9f, 0xf7, 0xde, 0x7e, 0xf6, 0xb3, 0xbb, 0xef, 0x9e, 0x60, 0x83, 0xde, - 0xa3, 0x0d, 0xca, 0xb0, 0xdf, 0x25, 0x8d, 0xc1, 0x15, 0x3d, 0xaa, 0xf7, 0x18, 0x4d, 0x28, 0xaa, - 0xd2, 0x7b, 0xb4, 0xae, 0x67, 0x06, 0x57, 0x36, 0xd6, 0xda, 0xb4, 0x4d, 0x25, 0xd2, 0x10, 0x23, - 0xe5, 0xb4, 0x51, 0xf3, 0x29, 0x8f, 0x28, 0x6f, 0xb4, 0x30, 0x17, 0x19, 0x5a, 0x24, 0xc1, 0x57, - 0x1a, 0x3e, 0x0d, 0x63, 0x85, 0xdb, 0x5f, 0x97, 0x61, 0xb1, 0x89, 0x19, 0x8e, 0x38, 0xba, 0x06, - 0xe5, 0x01, 0x4d, 0x88, 0xd7, 0x23, 0x2c, 0xa4, 0x81, 0x69, 0x6c, 0x19, 0xdb, 0x45, 0xe7, 0xec, - 0x28, 0xb5, 0xd0, 0x10, 0x47, 0xdd, 0x5d, 0x3b, 0x07, 0xda, 0x2e, 0x08, 0xab, 0x29, 0x0d, 0xe4, - 0xc3, 0xb2, 0xc4, 0x92, 0x0e, 0x23, 0xbc, 0x43, 0xbb, 0x81, 0x79, 0x62, 0xcb, 0xd8, 0x2e, 0x39, - 0xef, 0x3e, 0x4c, 0xad, 0xc2, 0xef, 0xa9, 0xb5, 0xa9, 0x38, 0xf0, 0xe0, 0xa0, 0x1e, 0xd2, 0x46, - 0x84, 0x93, 0x4e, 0xfd, 0x16, 0x69, 0x63, 0x7f, 0xb8, 0x47, 0xfc, 0x51, 0x6a, 0xad, 0xe7, 0xd2, - 0x8f, 0x53, 0xd8, 0x6e, 0x55, 0x4c, 0x7c, 0x94, 0xd9, 0xe8, 0x00, 0x2a, 0x8c, 0x1c, 0x62, 0x16, - 0x78, 0x2d, 0x1c, 0x07, 0xdc, 0x5c, 0xd8, 0x5a, 0xd8, 0x2e, 0xef, 0x9c, 0xaf, 0x4f, 0x89, 0x50, - 0x77, 0xa5, 0x8b, 0x83, 0xe3, 0xc0, 0xb9, 0x2c, 0x56, 0x1f, 0xa5, 0xd6, 0xaa, 0x4a, 0x9f, 0x0f, - 0xb6, 0x1f, 0x3c, 0xb6, 0x96, 0x27, 0xae, 0xb7, 0x42, 0x9e, 0xb8, 0x65, 0x36, 0xb6, 0x39, 0xf2, - 0x61, 0x43, 0xfb, 0x07, 0x21, 0x4f, 0x58, 0xd8, 0xea, 0x27, 0x21, 0x8d, 0xbd, 0xc3, 0x30, 0x0e, - 0xe8, 0xa1, 0x59, 0x94, 0xca, 0xbc, 0x3c, 0x4a, 0xad, 0xff, 0x4f, 0xe5, 0x9e, 0xe3, 0x6b, 0xbb, - 0xa6, 0x02, 0xf7, 0x72, 0xd8, 0x27, 0x12, 0x42, 0x9f, 0x42, 0x19, 0xfb, 0x3e, 0xe9, 0x25, 0x5e, - 0x37, 0xe4, 0x89, 0x79, 0x52, 0x6e, 0x68, 0x6d, 0x66, 0x43, 0x7b, 0x24, 0xa6, 0x91, 0xf3, 0xaa, - 0xde, 0x8b, 0x3e, 0x89, 0x5c, 0x98, 0xd8, 0x4a, 0x49, 0x3a, 0xc9, 0x5d, 0x80, 0x82, 0xc4, 0x58, - 0x1c, 0x0b, 0xef, 0x62, 0xde, 0xf1, 0x3e, 0x63, 0xd8, 0x17, 0xeb, 0x9a, 0x8b, 0x2f, 0x70, 0x2c, - 0xd3, 0x29, 0x6c, 0xb7, 0x2a, 0x27, 0x6e, 0x6a, 0x1b, 0xed, 0x42, 0x45, 0x79, 0x68, 0x6d, 0x4e, - 0x49, 0x6d, 0xce, 0x4d, 0x74, 0xcf, 0xa3, 0xb6, 0x5b, 0x96, 0xa6, 0x16, 0x80, 0xc3, 0x5a, 0x14, - 0xc6, 0xde, 0x00, 0x77, 0xc3, 0x40, 0x5c, 0xac, 0x2c, 0xc7, 0x92, 0xa4, 0xe9, 0x3c, 0x1f, 0xcd, - 0x4d, 0xb5, 0xcc, 0xbc, 0x44, 0xb6, 0x7b, 0x26, 0x0a, 0xe3, 0x3b, 0x62, 0xb6, 0x49, 0x98, 0x5e, - 0xb4, 0x0d, 0xcb, 0x11, 0x8e, 0x03, 0x9c, 0x50, 0x36, 0x54, 0xc2, 0x97, 0xfe, 0x41, 0xf8, 0xd7, - 0xb4, 0xf0, 0x5a, 0x8c, 0xe9, 0xc8, 0x19, 0xed, 0xab, 0x63, 0x54, 0xca, 0xbf, 0x03, 0xeb, 0x9d, - 0x90, 0x27, 0x94, 0x85, 0xbe, 0xc7, 0x13, 0x1c, 0xf5, 0xb2, 0x87, 0x05, 0x42, 0x22, 0x77, 0x35, - 0x03, 0xf7, 0x05, 0xa6, 0x5f, 0x52, 0x1d, 0x56, 0x23, 0x12, 0x84, 0x38, 0x9e, 0x8e, 0x28, 0xcb, - 0x88, 0x33, 0x0a, 0xca, 0xfb, 0xbf, 0x09, 0x6b, 0x11, 0x3e, 0x0a, 0xa3, 0x7e, 0xe4, 0xf5, 0x58, - 0xe8, 0x13, 0x15, 0xc6, 0xcd, 0x8a, 0x0c, 0x40, 0x1a, 0x6b, 0x0a, 0x48, 0x86, 0x71, 0xc1, 0x2a, - 0x8b, 0xc8, 0xaf, 0xc4, 0xcd, 0xaa, 0x62, 0xa5, 0xc1, 0x0f, 0x27, 0x4b, 0x71, 0xf4, 0xbd, 0x01, - 0xe7, 0xfc, 0x3e, 0x63, 0x24, 0xf6, 0x87, 0x5e, 0x0f, 0x87, 0xcc, 0xeb, 0x31, 0x3a, 0x08, 0x03, - 0xc2, 0xb8, 0xb9, 0x2c, 0xc5, 0xbb, 0x38, 0x23, 0xde, 0x0d, 0xed, 0xdd, 0xc4, 0x21, 0x6b, 0x66, - 0xbe, 0xce, 0x0d, 0x2d, 0x66, 0x4d, 0x89, 0x79, 0x4c, 0x4a, 0xa1, 0xea, 0xf9, 0xb9, 0x09, 0xa4, - 0xca, 0xeb, 0xfe, 0x3c, 0x08, 0xfd, 0x62, 0xc0, 0xff, 0xc6, 0x09, 0x03, 0x32, 0x08, 0xb1, 0x7c, - 0x85, 0xe3, 0x7a, 0xc2, 0xcd, 0x15, 0xc9, 0xf4, 0xd2, 0x31, 0x4c, 0xf7, 0xb2, 0x90, 0x71, 0xc5, - 0x71, 0x6e, 0x6b, 0xba, 0x17, 0x67, 0xe8, 0xce, 0xcb, 0x2e, 0x48, 0xd7, 0x8e, 0xcf, 0x25, 0x99, - 0x6f, 0xfa, 0xc7, 0xe2, 0x7c, 0x77, 0xe9, 0xbb, 0xfb, 0x56, 0xe1, 0xaf, 0xfb, 0x96, 0x61, 0xff, - 0x6c, 0xc0, 0x49, 0x79, 0xa9, 0xd0, 0x5b, 0x00, 0xa2, 0x6c, 0x7b, 0x81, 0xb0, 0x64, 0x3d, 0x2e, - 0x39, 0xeb, 0xa3, 0xd4, 0x3a, 0xa3, 0x08, 0x4d, 0x30, 0xdb, 0x2d, 0x09, 0x43, 0x45, 0x89, 0x17, - 0x39, 0x8c, 0x5a, 0xb4, 0xab, 0xe3, 0x54, 0x2d, 0xce, 0xbf, 0xc8, 0x1c, 0x2a, 0x5e, 0xa4, 0x34, - 0x55, 0x6c, 0x03, 0x96, 0xc8, 0x51, 0x8f, 0xc6, 0x24, 0x4e, 0xcc, 0x85, 0x2d, 0x63, 0xbb, 0xea, - 0xac, 0x8e, 0x52, 0x6b, 0x45, 0xc5, 0x65, 0x88, 0xed, 0x8e, 0x9d, 0x76, 0x2b, 0x5f, 0xde, 0xb7, - 0x0a, 0x9a, 0x7a, 0xc1, 0xfe, 0xd1, 0x00, 0x98, 0x94, 0xd5, 0x67, 0x98, 0x18, 0xff, 0x81, 0xc9, - 0x5d, 0x28, 0xe7, 0x2a, 0xb6, 0xde, 0xc4, 0x3b, 0xcf, 0x57, 0x12, 0xd0, 0x33, 0x15, 0xdf, 0x76, - 0x61, 0x52, 0xde, 0x67, 0x48, 0xff, 0x64, 0xc0, 0x85, 0xeb, 0xed, 0x36, 0x23, 0x6d, 0x9c, 0x90, - 0xf7, 0x8f, 0xfc, 0x0e, 0x8e, 0xdb, 0xc4, 0xc5, 0x09, 0x69, 0x32, 0x22, 0x3e, 0x41, 0xe8, 0x25, - 0x28, 0x76, 0x30, 0xef, 0x68, 0xfa, 0x2b, 0xa3, 0xd4, 0x2a, 0xab, 0x05, 0xc4, 0xac, 0xed, 0x4a, - 0x10, 0xbd, 0x02, 0x27, 0x85, 0x33, 0xd3, 0x4c, 0x4f, 0x8f, 0x52, 0xab, 0x32, 0xf9, 0xae, 0x31, - 0xdb, 0x55, 0xb0, 0xd4, 0xa4, 0xdf, 0x8a, 0xc2, 0xc4, 0x6b, 0x75, 0xa9, 0x7f, 0x20, 0x55, 0x9e, - 0xae, 0x97, 0x39, 0x54, 0x68, 0x22, 0x4d, 0x47, 0x58, 0x33, 0xbc, 0x7f, 0x35, 0xe0, 0xfc, 0x5c, - 0xde, 0x77, 0x04, 0xe9, 0x23, 0x58, 0x26, 0x7a, 0xce, 0x63, 0x38, 0x21, 0xdc, 0x34, 0xe4, 0xfd, - 0xbf, 0x50, 0x57, 0xda, 0xd5, 0xc5, 0x85, 0xa9, 0xeb, 0x86, 0xa0, 0xbe, 0x47, 0xfc, 0x1b, 0x34, - 0x8c, 0x9d, 0xab, 0x42, 0xe0, 0x07, 0x8f, 0xad, 0xd7, 0xdb, 0x61, 0xd2, 0xe9, 0xb7, 0xea, 0x3e, - 0x8d, 0x1a, 0xba, 0x81, 0x50, 0x3f, 0x97, 0x79, 0x70, 0xd0, 0x48, 0x86, 0x3d, 0xc2, 0xb3, 0x18, - 0xee, 0x56, 0x49, 0x6e, 0x71, 0xfe, 0xbc, 0x4a, 0xcc, 0xec, 0xa6, 0x0b, 0x30, 0x29, 0x53, 0xe8, - 0x3a, 0x54, 0xa7, 0xd8, 0x4b, 0xed, 0xff, 0x85, 0xbc, 0x5b, 0xc9, 0xf3, 0x40, 0x9b, 0x50, 0x92, - 0x1a, 0x7a, 0x71, 0x5f, 0xbd, 0x81, 0xa2, 0xbb, 0x24, 0x27, 0x6e, 0xf7, 0x23, 0x7b, 0x1f, 0x90, - 0xfc, 0x2c, 0x88, 0x6a, 0xad, 0x2e, 0xec, 0x3e, 0x49, 0xd0, 0x7b, 0x50, 0x1d, 0x64, 0xb3, 0x1e, - 0x27, 0x89, 0x94, 0xac, 0xe4, 0x98, 0xa3, 0xd4, 0x5a, 0xd3, 0x3b, 0xc8, 0xc3, 0xb6, 0x5b, 0x19, - 0xdb, 0xfb, 0x24, 0xb1, 0x7f, 0x38, 0x01, 0xeb, 0x73, 0xeb, 0xd6, 0x0b, 0x3e, 0xe4, 0x6b, 0x50, - 0xfe, 0xbc, 0x2f, 0x9a, 0xa2, 0xfc, 0x3b, 0xce, 0xf5, 0x63, 0x39, 0xd0, 0x76, 0x41, 0x5a, 0x2a, - 0xb0, 0x05, 0x15, 0x59, 0x52, 0x71, 0x10, 0x30, 0xc2, 0xb3, 0x56, 0xc9, 0x9e, 0xa9, 0x7c, 0x82, - 0xe2, 0x75, 0xe5, 0x91, 0x31, 0x75, 0x36, 0xa7, 0x7b, 0xa6, 0x7c, 0x16, 0xdb, 0x2d, 0xf7, 0x26, - 0x11, 0x68, 0x07, 0x4a, 0x93, 0x8f, 0x40, 0x51, 0xea, 0xb4, 0x36, 0x4a, 0xad, 0xd3, 0x3a, 0x70, - 0x5c, 0xcc, 0xdd, 0x89, 0xdb, 0xcc, 0x89, 0x7f, 0x65, 0xc0, 0xea, 0x1c, 0x0e, 0xe8, 0x0d, 0x38, - 0x95, 0x11, 0x57, 0x4a, 0xa1, 0x51, 0x6a, 0x2d, 0xeb, 0xc6, 0x27, 0xe3, 0x92, 0xb9, 0xa0, 0x9b, - 0x70, 0x5a, 0x0f, 0xc7, 0x5f, 0x10, 0xad, 0xd4, 0xe6, 0x28, 0xb5, 0xce, 0x4d, 0x85, 0x8d, 0x3d, - 0x6c, 0x77, 0x05, 0x4f, 0xaf, 0x6a, 0x7f, 0x6b, 0xc0, 0xc6, 0xf1, 0xf5, 0xfb, 0x05, 0x4f, 0x70, - 0x07, 0x4a, 0xb3, 0x3d, 0x71, 0x4e, 0xa4, 0x5c, 0xaf, 0x3b, 0x71, 0x9b, 0x11, 0xe9, 0x0b, 0x03, - 0x56, 0x64, 0x7b, 0xfe, 0x71, 0x2f, 0x10, 0x25, 0xa9, 0x8b, 0x63, 0x84, 0xa0, 0x78, 0x40, 0x86, - 0xea, 0x41, 0x97, 0x5c, 0x39, 0x46, 0x67, 0x61, 0xb1, 0x43, 0xc2, 0x76, 0x27, 0x91, 0xcb, 0x2c, - 0xb8, 0xda, 0x42, 0x6f, 0xc3, 0x29, 0xf5, 0x26, 0xb8, 0xac, 0x34, 0xe5, 0x9d, 0xf5, 0x67, 0x6e, - 0x81, 0xe8, 0xfd, 0x9d, 0xa2, 0x38, 0x78, 0x37, 0xf3, 0x9d, 0x22, 0x61, 0x38, 0x1f, 0x3c, 0xfc, - 0xb3, 0x56, 0x78, 0xf8, 0xa4, 0x66, 0x3c, 0x7a, 0x52, 0x33, 0xfe, 0x78, 0x52, 0x33, 0xbe, 0x79, - 0x5a, 0x2b, 0x3c, 0x7a, 0x5a, 0x2b, 0xfc, 0xf6, 0xb4, 0x56, 0xb8, 0x7b, 0x29, 0x57, 0x2b, 0xe8, - 0x3d, 0x7a, 0x39, 0x26, 0xc9, 0x21, 0x65, 0x07, 0x62, 0xdc, 0x38, 0xca, 0xfe, 0xbb, 0xc8, 0x92, - 0xd1, 0x5a, 0x94, 0xff, 0x39, 0xae, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x57, 0x45, 0x01, 0x50, - 0xd6, 0x0c, 0x00, 0x00, + // 1523 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x6f, 0xdb, 0x46, + 0x16, 0x17, 0xe3, 0x4f, 0x8d, 0x24, 0x7f, 0xd0, 0x76, 0x4c, 0xdb, 0x59, 0xd1, 0xcb, 0xcd, 0xee, + 0x3a, 0x9b, 0x8d, 0xb4, 0x71, 0x76, 0x11, 0xac, 0xb1, 0x7b, 0x08, 0xed, 0xa4, 0x2d, 0x90, 0x06, + 0xc2, 0xb8, 0x4d, 0x81, 0x1c, 0xca, 0x8e, 0xc8, 0xa9, 0xc4, 0x58, 0xe4, 0x28, 0x33, 0x94, 0x6d, + 0x5d, 0x7b, 0x2a, 0xd0, 0x4b, 0x0f, 0x3d, 0xf4, 0x98, 0xde, 0x8a, 0x1c, 0x0b, 0x14, 0xe8, 0xa5, + 0xf7, 0x00, 0xbd, 0xe4, 0x58, 0xf4, 0xc0, 0xb4, 0xc9, 0xa5, 0xd7, 0xea, 0x2f, 0x28, 0xe6, 0x83, + 0xe2, 0x48, 0x96, 0xdb, 0x34, 0x27, 0xf1, 0xcd, 0xef, 0xbd, 0x37, 0xbf, 0xf9, 0x71, 0xde, 0x7b, + 0x14, 0xd8, 0x24, 0x0f, 0x49, 0x9d, 0x50, 0xe4, 0x77, 0x70, 0xfd, 0xf8, 0xba, 0x7a, 0xaa, 0x75, + 0x29, 0x49, 0x88, 0x59, 0x21, 0x0f, 0x49, 0x4d, 0xad, 0x1c, 0x5f, 0xdf, 0x5c, 0x6d, 0x91, 0x16, + 0x11, 0x48, 0x9d, 0x3f, 0x49, 0xa7, 0xcd, 0xaa, 0x4f, 0x58, 0x44, 0x58, 0xbd, 0x89, 0x18, 0xcf, + 0xd0, 0xc4, 0x09, 0xba, 0x5e, 0xf7, 0x49, 0x18, 0x4b, 0xdc, 0xf9, 0xa5, 0x04, 0x66, 0x1b, 0x88, + 0xa2, 0x88, 0x99, 0x37, 0x41, 0xe9, 0x98, 0x24, 0xd8, 0xeb, 0x62, 0x1a, 0x92, 0xc0, 0x32, 0xb6, + 0x8d, 0x9d, 0x69, 0xf7, 0xe2, 0x20, 0xb5, 0xcd, 0x3e, 0x8a, 0x3a, 0x7b, 0x8e, 0x06, 0x3a, 0x10, + 0x70, 0xab, 0x21, 0x0c, 0xd3, 0x07, 0x0b, 0x02, 0x4b, 0xda, 0x14, 0xb3, 0x36, 0xe9, 0x04, 0xd6, + 0x85, 0x6d, 0x63, 0xa7, 0xe8, 0xfe, 0xef, 0x69, 0x6a, 0x17, 0x7e, 0x48, 0xed, 0x2d, 0xc9, 0x81, + 0x05, 0x47, 0xb5, 0x90, 0xd4, 0x23, 0x94, 0xb4, 0x6b, 0x77, 0x71, 0x0b, 0xf9, 0xfd, 0x03, 0xec, + 0x0f, 0x52, 0x7b, 0x4d, 0x4b, 0x3f, 0x4c, 0xe1, 0xc0, 0x0a, 0x5f, 0x78, 0x27, 0xb3, 0xcd, 0x23, + 0x50, 0xa6, 0xf8, 0x04, 0xd1, 0xc0, 0x6b, 0xa2, 0x38, 0x60, 0xd6, 0xd4, 0xf6, 0xd4, 0x4e, 0x69, + 0x77, 0xa3, 0x36, 0x22, 0x42, 0x0d, 0x0a, 0x17, 0x17, 0xc5, 0x81, 0x7b, 0x8d, 0xef, 0x3e, 0x48, + 0xed, 0x15, 0x99, 0x5e, 0x0f, 0x76, 0x9e, 0x3c, 0xb7, 0x17, 0x72, 0xd7, 0xbb, 0x21, 0x4b, 0x60, + 0x89, 0x0e, 0x6d, 0x66, 0xfa, 0x60, 0x53, 0xf9, 0x07, 0x21, 0x4b, 0x68, 0xd8, 0xec, 0x25, 0x21, + 0x89, 0xbd, 0x93, 0x30, 0x0e, 0xc8, 0x89, 0x35, 0x2d, 0x94, 0xf9, 0xeb, 0x20, 0xb5, 0xff, 0x3c, + 0x92, 0x7b, 0x82, 0xaf, 0x03, 0x2d, 0x09, 0x1e, 0x68, 0xd8, 0x7b, 0x02, 0x32, 0xdf, 0x07, 0x25, + 0xe4, 0xfb, 0xb8, 0x9b, 0x78, 0x9d, 0x90, 0x25, 0xd6, 0x8c, 0x38, 0xd0, 0xea, 0xd8, 0x81, 0x0e, + 0x70, 0x4c, 0x22, 0xf7, 0xef, 0xea, 0x2c, 0xea, 0x4d, 0x68, 0x61, 0xfc, 0x28, 0x45, 0xe1, 0x24, + 0x4e, 0x01, 0x24, 0xc4, 0x9f, 0xf9, 0x6b, 0x61, 0x1d, 0xc4, 0xda, 0xde, 0x87, 0x14, 0xf9, 0x7c, + 0x5f, 0x6b, 0xf6, 0x35, 0x5e, 0xcb, 0x68, 0x0a, 0x07, 0x56, 0xc4, 0xc2, 0x1d, 0x65, 0x9b, 0x7b, + 0xa0, 0x2c, 0x3d, 0x94, 0x36, 0x73, 0x42, 0x9b, 0xf5, 0x5c, 0x77, 0x1d, 0x75, 0x60, 0x49, 0x98, + 0x4a, 0x00, 0x06, 0x56, 0xa3, 0x30, 0xf6, 0x8e, 0x51, 0x27, 0x0c, 0xf8, 0xc5, 0xca, 0x72, 0xcc, + 0x0b, 0x9a, 0xee, 0xab, 0xd1, 0xdc, 0x92, 0xdb, 0x4c, 0x4a, 0xe4, 0xc0, 0xe5, 0x28, 0x8c, 0xef, + 0xf3, 0xd5, 0x06, 0xa6, 0x6a, 0xd3, 0x16, 0x58, 0x88, 0x50, 0x1c, 0xa0, 0x84, 0xd0, 0xbe, 0x14, + 0xbe, 0xf8, 0x1b, 0xc2, 0xff, 0x43, 0x09, 0xaf, 0xc4, 0x18, 0x8d, 0x1c, 0xd3, 0xbe, 0x32, 0x44, + 0x85, 0xfc, 0xbb, 0x60, 0xad, 0x1d, 0xb2, 0x84, 0xd0, 0xd0, 0xf7, 0x58, 0x82, 0xa2, 0x6e, 0x56, + 0x58, 0x80, 0x4b, 0x04, 0x57, 0x32, 0xf0, 0x90, 0x63, 0xaa, 0x92, 0x6a, 0x60, 0x25, 0xc2, 0x41, + 0x88, 0xe2, 0xd1, 0x88, 0x92, 0x88, 0x58, 0x96, 0x90, 0xee, 0xff, 0x2f, 0xb0, 0x1a, 0xa1, 0xd3, + 0x30, 0xea, 0x45, 0x5e, 0x97, 0x86, 0x3e, 0x96, 0x61, 0xcc, 0x2a, 0x8b, 0x00, 0x53, 0x61, 0x0d, + 0x0e, 0x89, 0x30, 0xc6, 0x59, 0x65, 0x11, 0xfa, 0x4e, 0xcc, 0xaa, 0x48, 0x56, 0x0a, 0x7c, 0x3b, + 0xdf, 0x8a, 0x99, 0x5f, 0x18, 0x60, 0xdd, 0xef, 0x51, 0x8a, 0x63, 0xbf, 0xef, 0x75, 0x51, 0x48, + 0xbd, 0x2e, 0x25, 0xc7, 0x61, 0x80, 0x29, 0xb3, 0x16, 0x84, 0x78, 0x97, 0xc7, 0xc4, 0xdb, 0x57, + 0xde, 0x0d, 0x14, 0xd2, 0x46, 0xe6, 0xeb, 0xee, 0x2b, 0x31, 0xab, 0x52, 0xcc, 0x73, 0x52, 0x72, + 0x55, 0x37, 0x26, 0x26, 0x10, 0x2a, 0xaf, 0xf9, 0x93, 0x20, 0xf3, 0x5b, 0x03, 0xfc, 0x69, 0x98, + 0x30, 0xc0, 0xc7, 0x21, 0x12, 0x55, 0x38, 0xec, 0x27, 0xcc, 0x5a, 0x14, 0x4c, 0xaf, 0x9c, 0xc3, + 0xf4, 0x20, 0x0b, 0x19, 0x76, 0x1c, 0xf7, 0x9e, 0xa2, 0x7b, 0x79, 0x8c, 0xee, 0xa4, 0xec, 0x9c, + 0x74, 0xf5, 0xfc, 0x5c, 0x82, 0xf9, 0x96, 0x7f, 0x2e, 0xce, 0xcc, 0x0f, 0xc0, 0x06, 0x3e, 0x4d, + 0x30, 0x8d, 0x51, 0xc7, 0xeb, 0x84, 0x8f, 0x7a, 0x61, 0x10, 0x26, 0xfd, 0xec, 0xfd, 0x2f, 0x89, + 0xa2, 0xba, 0x3c, 0x48, 0xed, 0x6d, 0xc9, 0xe5, 0x5c, 0x57, 0x07, 0xae, 0x67, 0xd8, 0xdd, 0x0c, + 0x92, 0x77, 0x65, 0x6f, 0xfe, 0xf3, 0xc7, 0x76, 0xe1, 0xe7, 0xc7, 0xb6, 0xe1, 0x7c, 0x63, 0x80, + 0x19, 0x71, 0x6d, 0xcd, 0x7f, 0x03, 0xc0, 0x07, 0x83, 0x17, 0x70, 0x4b, 0x74, 0xfc, 0xa2, 0xbb, + 0x36, 0x48, 0xed, 0x65, 0xb9, 0x4d, 0x8e, 0x39, 0xb0, 0xc8, 0x0d, 0x19, 0xc5, 0x6b, 0xbe, 0x1f, + 0x35, 0x49, 0x47, 0xc5, 0xc9, 0x6e, 0xaf, 0xd7, 0xbc, 0x86, 0xf2, 0x9a, 0x17, 0xa6, 0x8c, 0xad, + 0x83, 0x79, 0x7c, 0xda, 0x25, 0x31, 0x8e, 0x13, 0x6b, 0x6a, 0xdb, 0xd8, 0xa9, 0xb8, 0x2b, 0x83, + 0xd4, 0x5e, 0xcc, 0x8e, 0x25, 0x11, 0x07, 0x0e, 0x9d, 0xf6, 0xca, 0x1f, 0x3f, 0xb6, 0x0b, 0x8a, + 0x7a, 0xc1, 0xf9, 0xca, 0x00, 0x20, 0x6f, 0xdc, 0x67, 0x98, 0x18, 0x7f, 0x80, 0xc9, 0x03, 0x50, + 0xd2, 0x66, 0x82, 0x3a, 0xc4, 0x7f, 0x5f, 0xad, 0xe9, 0x98, 0x67, 0x66, 0x8a, 0x03, 0x41, 0x3e, + 0x40, 0xc6, 0x48, 0x7f, 0x6d, 0x80, 0x4b, 0xb7, 0x5a, 0x2d, 0x8a, 0x5b, 0x28, 0xc1, 0xb7, 0x4f, + 0xfd, 0x36, 0x8a, 0x5b, 0x18, 0xa2, 0x04, 0x37, 0x28, 0xe6, 0x43, 0xce, 0xfc, 0x0b, 0x98, 0x6e, + 0x23, 0xd6, 0x56, 0xf4, 0x17, 0x07, 0xa9, 0x5d, 0x92, 0x1b, 0xf0, 0x55, 0x07, 0x0a, 0xd0, 0xfc, + 0x1b, 0x98, 0xe1, 0xce, 0x54, 0x31, 0x5d, 0x1a, 0xa4, 0x76, 0x39, 0x9f, 0x9c, 0xd4, 0x81, 0x12, + 0x16, 0x9a, 0xf4, 0x9a, 0x51, 0x98, 0x78, 0xcd, 0x0e, 0xf1, 0x8f, 0x84, 0xca, 0xa3, 0x1d, 0x59, + 0x43, 0xb9, 0x26, 0xc2, 0x74, 0xb9, 0x35, 0xc6, 0xfb, 0x3b, 0x03, 0x6c, 0x4c, 0xe4, 0x7d, 0x9f, + 0x93, 0x3e, 0x05, 0x0b, 0x58, 0xad, 0x79, 0x14, 0x25, 0x98, 0x59, 0x86, 0xa8, 0xb0, 0x4b, 0x35, + 0xa9, 0x5d, 0x8d, 0x5f, 0x98, 0x9a, 0xfa, 0xe4, 0xa8, 0x1d, 0x60, 0x7f, 0x9f, 0x84, 0xb1, 0x7b, + 0x83, 0x0b, 0xfc, 0xe4, 0xb9, 0x7d, 0xb5, 0x15, 0x26, 0xed, 0x5e, 0xb3, 0xe6, 0x93, 0xa8, 0xae, + 0x3e, 0x51, 0xe4, 0xcf, 0x35, 0x16, 0x1c, 0xd5, 0x93, 0x7e, 0x17, 0xb3, 0x2c, 0x86, 0xc1, 0x0a, + 0xd6, 0x36, 0x67, 0xaf, 0xaa, 0xc4, 0xd8, 0x69, 0x3a, 0x00, 0xe4, 0x8d, 0xd0, 0xbc, 0x05, 0x2a, + 0x23, 0xec, 0x85, 0xf6, 0xbf, 0x43, 0x1e, 0x96, 0x75, 0x1e, 0xe6, 0x16, 0x28, 0x0a, 0x0d, 0xbd, + 0xb8, 0x27, 0x6b, 0x60, 0x1a, 0xce, 0x8b, 0x85, 0x7b, 0xbd, 0xc8, 0x39, 0x04, 0xa6, 0x18, 0x3c, + 0x7c, 0x1e, 0xc8, 0x0b, 0x7b, 0x88, 0x13, 0xf3, 0xff, 0xa0, 0x72, 0x9c, 0xad, 0x7a, 0x0c, 0x27, + 0x42, 0xb2, 0xa2, 0x6b, 0x0d, 0x52, 0x7b, 0x55, 0x9d, 0x40, 0x87, 0x1d, 0x58, 0x1e, 0xda, 0x87, + 0x38, 0x71, 0xbe, 0x9c, 0x01, 0x6b, 0x13, 0x3b, 0xe3, 0x6b, 0x16, 0xf2, 0x4d, 0x50, 0x7a, 0xd4, + 0xe3, 0x9f, 0x5d, 0x7a, 0x1d, 0x6b, 0x5f, 0x7c, 0x1a, 0xe8, 0x40, 0x20, 0x2c, 0x19, 0x78, 0x1b, + 0x2c, 0x89, 0x94, 0x5d, 0x4a, 0x4e, 0xfb, 0x2a, 0x7a, 0x4a, 0x44, 0x6f, 0x0d, 0x52, 0x7b, 0x5d, + 0xdb, 0x54, 0xf3, 0x70, 0xe0, 0x02, 0x5f, 0x6a, 0xf0, 0x15, 0x99, 0xe6, 0x4d, 0xb0, 0x2c, 0xb7, + 0xd0, 0xf3, 0x4c, 0x8b, 0x3c, 0x97, 0x06, 0xa9, 0x6d, 0xe9, 0x2c, 0x46, 0x12, 0x2d, 0x8a, 0x35, + 0x2d, 0xd3, 0x55, 0x30, 0xd7, 0x25, 0xa4, 0xe3, 0x85, 0x81, 0x35, 0x23, 0xee, 0xbb, 0x39, 0x48, + 0xed, 0x05, 0x19, 0xaf, 0x00, 0x07, 0xce, 0xf2, 0xa7, 0xb7, 0x82, 0xbc, 0xd7, 0xea, 0xed, 0x53, + 0x49, 0xa9, 0xbe, 0x91, 0xce, 0xf4, 0xda, 0x09, 0xae, 0xc3, 0x5e, 0x9b, 0x77, 0x5a, 0x85, 0x98, + 0x0f, 0xc0, 0xba, 0x4f, 0xfb, 0xdd, 0x84, 0x78, 0x3e, 0x89, 0xba, 0x88, 0x62, 0x2f, 0xbb, 0x39, + 0xe2, 0x03, 0xa9, 0xe8, 0x3a, 0xda, 0x18, 0x9c, 0xec, 0xe8, 0xc0, 0x35, 0x89, 0xec, 0x4b, 0x20, + 0xab, 0x3f, 0xb3, 0x09, 0xca, 0x62, 0x60, 0xa2, 0x20, 0xa0, 0x98, 0x31, 0x6b, 0x5e, 0x54, 0x9d, + 0x33, 0x36, 0xd7, 0xf8, 0xf5, 0xb8, 0x25, 0x3d, 0x32, 0x56, 0xee, 0xd6, 0xe8, 0x17, 0xb1, 0x9e, + 0xc5, 0x81, 0xa5, 0x6e, 0x1e, 0x61, 0xee, 0x82, 0x62, 0x3e, 0xe2, 0x8b, 0xe2, 0x8e, 0xae, 0x0e, + 0x52, 0x7b, 0x49, 0x05, 0x0e, 0x47, 0x35, 0xcc, 0xdd, 0xc6, 0xaa, 0xed, 0x13, 0x03, 0xac, 0x4c, + 0xe0, 0x60, 0xfe, 0x13, 0xcc, 0x65, 0xc4, 0xe5, 0x2d, 0xd5, 0x5e, 0xd4, 0x90, 0x4b, 0xe6, 0x62, + 0xde, 0x01, 0x4b, 0xea, 0x31, 0x7f, 0x41, 0x17, 0xc6, 0xef, 0xd9, 0xb8, 0x87, 0x03, 0x17, 0xd1, + 0xe8, 0xae, 0xce, 0x67, 0x06, 0xd8, 0x3c, 0x7f, 0x3a, 0xbf, 0x66, 0xf5, 0xec, 0x82, 0xe2, 0xf8, + 0x3f, 0x1e, 0x4d, 0x24, 0xed, 0x9f, 0x4c, 0xee, 0x36, 0x26, 0xd2, 0x47, 0x06, 0x58, 0x14, 0x7f, + 0xbe, 0xde, 0xed, 0x06, 0x7c, 0x1c, 0x74, 0x50, 0x6c, 0x9a, 0x60, 0xfa, 0x08, 0xf7, 0x65, 0x33, + 0x2d, 0x42, 0xf1, 0x6c, 0x5e, 0x04, 0xb3, 0x6d, 0x1c, 0xb6, 0xda, 0x89, 0xd8, 0x66, 0x0a, 0x2a, + 0xcb, 0xfc, 0x0f, 0x98, 0x93, 0x97, 0x82, 0x89, 0xea, 0x2b, 0xed, 0xae, 0x9d, 0xb9, 0x05, 0xfc, + 0x9f, 0x9d, 0x3b, 0xcd, 0x5f, 0x3c, 0xcc, 0x7c, 0x47, 0x48, 0x18, 0xee, 0x1b, 0x4f, 0x7f, 0xaa, + 0x16, 0x9e, 0xbe, 0xa8, 0x1a, 0xcf, 0x5e, 0x54, 0x8d, 0x1f, 0x5f, 0x54, 0x8d, 0x4f, 0x5f, 0x56, + 0x0b, 0xcf, 0x5e, 0x56, 0x0b, 0xdf, 0xbf, 0xac, 0x16, 0x1e, 0x5c, 0xd1, 0xfa, 0x34, 0x79, 0x48, + 0xae, 0xc5, 0x38, 0x39, 0x21, 0xf4, 0x88, 0x3f, 0xd7, 0x4f, 0xb3, 0x7f, 0xa6, 0xa2, 0x5d, 0x37, + 0x67, 0xc5, 0x3f, 0xca, 0x1b, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xaf, 0x84, 0x04, 0xb4, + 0x0e, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -686,6 +704,9 @@ func (this *Params) Equal(that interface{}) bool { return false } } + if this.ExternalLiquidityPeriod != that1.ExternalLiquidityPeriod { + return false + } return true } func (this *ParamUpdatePlan) Equal(that interface{}) bool { @@ -743,6 +764,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ExternalLiquidityPeriod != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.ExternalLiquidityPeriod)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } if len(m.CurrencyDeviationThresholds) > 0 { for iNdEx := len(m.CurrencyDeviationThresholds) - 1; iNdEx >= 0; iNdEx-- { { @@ -1147,7 +1175,7 @@ func (m *CurrencyPairProviders) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Providers[iNdEx]) i = encodeVarintOracle(dAtA, i, uint64(len(m.Providers[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x4a } } if len(m.PairAddress) > 0 { @@ -1161,9 +1189,42 @@ func (m *CurrencyPairProviders) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintOracle(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x42 } } + if len(m.CryptoCompareExchange) > 0 { + i -= len(m.CryptoCompareExchange) + copy(dAtA[i:], m.CryptoCompareExchange) + i = encodeVarintOracle(dAtA, i, uint64(len(m.CryptoCompareExchange))) + i-- + dAtA[i] = 0x3a + } + if len(m.ExternLiquidityProvider) > 0 { + i -= len(m.ExternLiquidityProvider) + copy(dAtA[i:], m.ExternLiquidityProvider) + i = encodeVarintOracle(dAtA, i, uint64(len(m.ExternLiquidityProvider))) + i-- + dAtA[i] = 0x32 + } + if m.PoolId != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x28 + } + if len(m.QuoteProxyDenom) > 0 { + i -= len(m.QuoteProxyDenom) + copy(dAtA[i:], m.QuoteProxyDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.QuoteProxyDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.BaseProxyDenom) > 0 { + i -= len(m.BaseProxyDenom) + copy(dAtA[i:], m.BaseProxyDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.BaseProxyDenom))) + i-- + dAtA[i] = 0x1a + } if len(m.QuoteDenom) > 0 { i -= len(m.QuoteDenom) copy(dAtA[i:], m.QuoteDenom) @@ -1376,6 +1437,9 @@ func (m *Params) Size() (n int) { n += 1 + l + sovOracle(uint64(l)) } } + if m.ExternalLiquidityPeriod != 0 { + n += 2 + sovOracle(uint64(m.ExternalLiquidityPeriod)) + } return n } @@ -1498,6 +1562,25 @@ func (m *CurrencyPairProviders) Size() (n int) { if l > 0 { n += 1 + l + sovOracle(uint64(l)) } + l = len(m.BaseProxyDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.QuoteProxyDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + if m.PoolId != 0 { + n += 1 + sovOracle(uint64(m.PoolId)) + } + l = len(m.ExternLiquidityProvider) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.CryptoCompareExchange) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } if len(m.PairAddress) > 0 { for _, e := range m.PairAddress { l = e.Size() @@ -2007,6 +2090,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalLiquidityPeriod", wireType) + } + m.ExternalLiquidityPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExternalLiquidityPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipOracle(dAtA[iNdEx:]) @@ -2807,6 +2909,153 @@ func (m *CurrencyPairProviders) Unmarshal(dAtA []byte) error { m.QuoteDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseProxyDenom", 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.BaseProxyDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteProxyDenom", 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.QuoteProxyDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternLiquidityProvider", 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.ExternLiquidityProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CryptoCompareExchange", 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.CryptoCompareExchange = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PairAddress", wireType) } @@ -2840,7 +3089,7 @@ func (m *CurrencyPairProviders) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Providers", wireType) } diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go index d9e1fd37..a39e52ba 100644 --- a/x/oracle/types/params.go +++ b/x/oracle/types/params.go @@ -19,6 +19,7 @@ const ( // Parameter keys var ( + KeyParams = []byte("Params") KeyVotePeriod = []byte("VotePeriod") KeyVoteThreshold = []byte("VoteThreshold") KeyRewardBands = []byte("RewardBands") @@ -34,6 +35,7 @@ var ( KeyMaximumMedianStamps = []byte("MaximumMedianStamps") KeyCurrencyPairProviders = []byte("CurrencyPairProviders") KeyCurrencyDeviationThresholds = []byte("CurrencyDeviationThresholds") + KeyExternalLiquidityPeriod = []byte("ExternalLiquidityPeriod") ) // Default parameter values @@ -45,6 +47,7 @@ const ( DefaultMaximumPriceStamps = 60 // retain for 3 hours DefaultMedianStampPeriod = BlocksPerHour * 3 // window for 3 hours DefaultMaximumMedianStamps = 24 // retain for 3 days + DefaultExternalLiquidityPeriod = BlocksPerMinute * 5 // window for 5 minutes ) // Default parameter values @@ -77,6 +80,21 @@ var ( SymbolDenom: EthereumSymbol, Exponent: EthereumExponent, }, + { + BaseDenom: AKTDenom, + SymbolDenom: AKTSymbol, + Exponent: AKTExponent, + }, + { + BaseDenom: TIADenom, + SymbolDenom: TIASymbol, + Exponent: TIAExponent, + }, + { + BaseDenom: AXLDenom, + SymbolDenom: AXLSymbol, + Exponent: AXLExponent, + }, } DefaultMandatoryList = DenomList{ { @@ -99,6 +117,21 @@ var ( SymbolDenom: EthereumSymbol, Exponent: EthereumExponent, }, + { + BaseDenom: AKTDenom, + SymbolDenom: AKTSymbol, + Exponent: AKTExponent, + }, + { + BaseDenom: TIADenom, + SymbolDenom: TIASymbol, + Exponent: TIAExponent, + }, + { + BaseDenom: AXLDenom, + SymbolDenom: AXLSymbol, + Exponent: AXLExponent, + }, } DefaultSlashFraction = math.LegacyNewDecWithPrec(1, 4) // 0.01% DefaultMinValidPerWindow = math.LegacyNewDecWithPrec(5, 2) // 5% @@ -129,14 +162,26 @@ var ( "kraken", }, }, + CurrencyPairProviders{ + BaseDenom: USDCSymbol, + QuoteDenom: USDSymbol, + Providers: []string{ + "kraken", + }, + }, CurrencyPairProviders{ BaseDenom: AtomSymbol, QuoteDenom: USDTSymbol, Providers: []string{ + "binance", "okx", "bitget", "gate", }, + BaseProxyDenom: AtomSymbol, + QuoteProxyDenom: USDCSymbol, + ExternLiquidityProvider: "binance", + PoolId: 1, }, CurrencyPairProviders{ BaseDenom: BitcoinSymbol, @@ -169,6 +214,39 @@ var ( "bitget", }, }, + CurrencyPairProviders{ + BaseDenom: AKTSymbol, + QuoteDenom: USDTSymbol, + Providers: []string{ + "gate", + }, + BaseProxyDenom: AKTSymbol, + QuoteProxyDenom: USDCSymbol, + ExternLiquidityProvider: "gate", + PoolId: 3, + }, + CurrencyPairProviders{ + BaseDenom: TIASymbol, + QuoteDenom: USDTSymbol, + Providers: []string{ + "binance", + "gate", + "crypto", + }, + BaseProxyDenom: TIASymbol, + QuoteProxyDenom: USDCSymbol, + ExternLiquidityProvider: "binance", + PoolId: 2, + }, + CurrencyPairProviders{ + BaseDenom: AXLSymbol, + QuoteDenom: USDTSymbol, + Providers: []string{ + "binance", + }, + BaseProxyDenom: AXLSymbol, + QuoteProxyDenom: USDCSymbol, + }, } DefaultCurrencyDeviationThresholds = CurrencyDeviationThresholdList{ @@ -192,6 +270,18 @@ var ( BaseDenom: EthereumSymbol, Threshold: "2", }, + CurrencyDeviationThreshold{ + BaseDenom: AKTSymbol, + Threshold: "2", + }, + CurrencyDeviationThreshold{ + BaseDenom: TIASymbol, + Threshold: "2", + }, + CurrencyDeviationThreshold{ + BaseDenom: AXLSymbol, + Threshold: "2", + }, } ) @@ -223,6 +313,18 @@ func DefaultRewardBands() RewardBandList { SymbolDenom: EthereumSymbol, RewardBand: defaultRewardBand, }, + { + SymbolDenom: AKTSymbol, + RewardBand: defaultRewardBand, + }, + { + SymbolDenom: TIASymbol, + RewardBand: defaultRewardBand, + }, + { + SymbolDenom: AXLSymbol, + RewardBand: defaultRewardBand, + }, } } @@ -267,6 +369,7 @@ func DefaultParams() Params { RewardBands: DefaultRewardBands(), CurrencyPairProviders: DefaultCurrencyPairProviders, CurrencyDeviationThresholds: DefaultCurrencyDeviationThresholds, + ExternalLiquidityPeriod: DefaultExternalLiquidityPeriod, } } @@ -354,6 +457,11 @@ func (p *Params) ParamSetPairs() paramstypes.ParamSetPairs { &p.CurrencyDeviationThresholds, validateCurrencyDeviationThresholds, ), + paramstypes.NewParamSetPair( + KeyExternalLiquidityPeriod, + &p.ExternalLiquidityPeriod, + validateExternalLiquidityPeriod, + ), } } @@ -408,9 +516,9 @@ func (p Params) Validate() error { ) } - if p.HistoricStampPeriod%p.VotePeriod != 0 || p.MedianStampPeriod%p.VotePeriod != 0 { + if p.HistoricStampPeriod%p.VotePeriod != 0 || p.MedianStampPeriod%p.VotePeriod != 0 || p.ExternalLiquidityPeriod%p.VotePeriod != 0 { return ErrInvalidParamValue.Wrap( - "oracle parameters HistoricStampPeriod and MedianStampPeriod must be exact multiples of VotePeriod", + "oracle parameters HistoricStampPeriod, MedianStampPeriod, and ExternalLiquidityPeriod must be exact multiples of VotePeriod", ) } @@ -659,3 +767,16 @@ func validateCurrencyDeviationThresholds(i interface{}) error { return nil } + +func validateExternalLiquidityPeriod(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 ExternalLiquidityPeriod must be > 0") + } + + return nil +} diff --git a/x/oracle/types/params_test.go b/x/oracle/types/params_test.go index a05f0a19..49de046d 100644 --- a/x/oracle/types/params_test.go +++ b/x/oracle/types/params_test.go @@ -309,5 +309,8 @@ func TestAddDefaultRB(t *testing.T) { "symbol_denom: USDT\nreward_band: \"0.020000000000000000\"\n\n"+ "symbol_denom: BTC\nreward_band: \"0.020000000000000000\"\n\n"+ "symbol_denom: ETH\nreward_band: \"0.020000000000000000\"\n\n"+ + "symbol_denom: AKT\nreward_band: \"0.020000000000000000\"\n\n"+ + "symbol_denom: TIA\nreward_band: \"0.020000000000000000\"\n\n"+ + "symbol_denom: AXL\nreward_band: \"0.020000000000000000\"\n\n"+ "symbol_denom: foo\nreward_band: \"0.020000000000000000\"") } diff --git a/x/oracle/types/plan.go b/x/oracle/types/plan.go index 455ce435..9bfc62fc 100644 --- a/x/oracle/types/plan.go +++ b/x/oracle/types/plan.go @@ -97,6 +97,11 @@ func (p ParamUpdatePlan) ValidateBasic() error { return err } + case string(KeyExternalLiquidityPeriod): + if err := validateExternalLiquidityPeriod(p.Changes.ExternalLiquidityPeriod); err != nil { + return err + } + default: return fmt.Errorf("%s is not an existing oracle param key", key) } diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index cb68bd3e..18fe911b 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" _ "github.com/gogo/protobuf/gogoproto" @@ -1063,1791 +1064,4830 @@ func (m *QueryValidatorRewardSetResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorRewardSetResponse proto.InternalMessageInfo -func init() { - proto.RegisterType((*QueryExchangeRates)(nil), "ojo.oracle.v1.QueryExchangeRates") - proto.RegisterType((*QueryExchangeRatesResponse)(nil), "ojo.oracle.v1.QueryExchangeRatesResponse") - proto.RegisterType((*QueryActiveExchangeRates)(nil), "ojo.oracle.v1.QueryActiveExchangeRates") - proto.RegisterType((*QueryActiveExchangeRatesResponse)(nil), "ojo.oracle.v1.QueryActiveExchangeRatesResponse") - proto.RegisterType((*QueryFeederDelegation)(nil), "ojo.oracle.v1.QueryFeederDelegation") - proto.RegisterType((*QueryFeederDelegationResponse)(nil), "ojo.oracle.v1.QueryFeederDelegationResponse") - proto.RegisterType((*QueryMissCounter)(nil), "ojo.oracle.v1.QueryMissCounter") - proto.RegisterType((*QueryMissCounterResponse)(nil), "ojo.oracle.v1.QueryMissCounterResponse") - proto.RegisterType((*QuerySlashWindow)(nil), "ojo.oracle.v1.QuerySlashWindow") - proto.RegisterType((*QuerySlashWindowResponse)(nil), "ojo.oracle.v1.QuerySlashWindowResponse") - proto.RegisterType((*QueryAggregatePrevote)(nil), "ojo.oracle.v1.QueryAggregatePrevote") - proto.RegisterType((*QueryAggregatePrevoteResponse)(nil), "ojo.oracle.v1.QueryAggregatePrevoteResponse") - proto.RegisterType((*QueryAggregatePrevotes)(nil), "ojo.oracle.v1.QueryAggregatePrevotes") - proto.RegisterType((*QueryAggregatePrevotesResponse)(nil), "ojo.oracle.v1.QueryAggregatePrevotesResponse") - proto.RegisterType((*QueryAggregateVote)(nil), "ojo.oracle.v1.QueryAggregateVote") - proto.RegisterType((*QueryAggregateVoteResponse)(nil), "ojo.oracle.v1.QueryAggregateVoteResponse") - proto.RegisterType((*QueryAggregateVotes)(nil), "ojo.oracle.v1.QueryAggregateVotes") - proto.RegisterType((*QueryAggregateVotesResponse)(nil), "ojo.oracle.v1.QueryAggregateVotesResponse") - proto.RegisterType((*QueryParams)(nil), "ojo.oracle.v1.QueryParams") - proto.RegisterType((*QueryParamsResponse)(nil), "ojo.oracle.v1.QueryParamsResponse") - proto.RegisterType((*QueryMedians)(nil), "ojo.oracle.v1.QueryMedians") - proto.RegisterType((*QueryMediansResponse)(nil), "ojo.oracle.v1.QueryMediansResponse") - proto.RegisterType((*QueryMedianDeviations)(nil), "ojo.oracle.v1.QueryMedianDeviations") - proto.RegisterType((*QueryMedianDeviationsResponse)(nil), "ojo.oracle.v1.QueryMedianDeviationsResponse") - proto.RegisterType((*QueryValidatorRewardSet)(nil), "ojo.oracle.v1.QueryValidatorRewardSet") - proto.RegisterType((*QueryValidatorRewardSetResponse)(nil), "ojo.oracle.v1.QueryValidatorRewardSetResponse") +// QueryLatestPricesRequest is the request type for the Query/LatestPrices RPC method. +type QueryLatestPricesRequest struct { + Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func init() { proto.RegisterFile("ojo/oracle/v1/query.proto", fileDescriptor_ac3bb5b34dcda556) } - -var fileDescriptor_ac3bb5b34dcda556 = []byte{ - // 1225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x97, 0x5b, 0x4f, 0x1b, 0x47, - 0x14, 0xc7, 0xbd, 0x69, 0x2e, 0xcd, 0x71, 0xec, 0x38, 0x13, 0x68, 0x60, 0x01, 0x1b, 0x96, 0xa4, - 0x40, 0x09, 0xbb, 0x35, 0x44, 0x8d, 0xe8, 0x4d, 0xe5, 0xd6, 0x54, 0xbd, 0x48, 0xc4, 0xa8, 0x44, - 0xea, 0x43, 0xdd, 0xc1, 0x3b, 0x35, 0x4b, 0xec, 0x1d, 0x77, 0x67, 0x31, 0x44, 0x69, 0x54, 0x29, - 0x4f, 0x7d, 0x8c, 0x84, 0xd4, 0x97, 0x3e, 0x94, 0x4a, 0x79, 0x69, 0xd5, 0x0f, 0xc2, 0x63, 0xa4, - 0xbe, 0xf4, 0xa9, 0x17, 0xe8, 0x43, 0x3f, 0x46, 0xe5, 0x99, 0xf1, 0x78, 0x6f, 0xc6, 0x26, 0x4f, - 0xe0, 0x73, 0xce, 0x9c, 0xff, 0x6f, 0xcf, 0xec, 0xcc, 0xdf, 0x86, 0x61, 0xba, 0x43, 0x2d, 0xea, - 0xe1, 0x4a, 0x8d, 0x58, 0xcd, 0xa2, 0xf5, 0xcd, 0x2e, 0xf1, 0x1e, 0x99, 0x0d, 0x8f, 0xfa, 0x14, - 0x65, 0xe8, 0x0e, 0x35, 0x45, 0xca, 0x6c, 0x16, 0xf5, 0x81, 0x2a, 0xad, 0x52, 0x9e, 0xb1, 0x5a, - 0xff, 0x89, 0x22, 0x7d, 0xb4, 0x4a, 0x69, 0xb5, 0x46, 0x2c, 0xdc, 0x70, 0x2c, 0xec, 0xba, 0xd4, - 0xc7, 0xbe, 0x43, 0x5d, 0x26, 0xb3, 0x7a, 0xb8, 0xbb, 0x6c, 0x26, 0x72, 0xf9, 0x0a, 0x65, 0x75, - 0xca, 0xac, 0x2d, 0xcc, 0x5a, 0xc9, 0x2d, 0xe2, 0xe3, 0xa2, 0x55, 0xa1, 0x8e, 0x2b, 0xf2, 0xc6, - 0x1d, 0x40, 0xf7, 0x5b, 0x34, 0x6b, 0xfb, 0x95, 0x6d, 0xec, 0x56, 0x49, 0x09, 0xfb, 0x84, 0xa1, - 0x01, 0xb8, 0x60, 0x13, 0x97, 0xd6, 0x87, 0xb4, 0x71, 0x6d, 0xfa, 0x72, 0x49, 0x7c, 0x78, 0xfb, - 0xd5, 0xef, 0x0f, 0x0b, 0xa9, 0xff, 0x0e, 0x0b, 0x29, 0xe3, 0x07, 0x0d, 0xf4, 0xf8, 0xb2, 0x12, - 0x61, 0x0d, 0xea, 0x32, 0x82, 0xf6, 0x21, 0x4b, 0x64, 0xa2, 0xec, 0xb5, 0x32, 0x43, 0xda, 0xf8, - 0x2b, 0xd3, 0xe9, 0xf9, 0x51, 0x53, 0xd0, 0x98, 0x2d, 0x1a, 0x53, 0xd2, 0x98, 0xab, 0xa4, 0xb2, - 0x42, 0x1d, 0x77, 0x79, 0xe1, 0xe8, 0xcf, 0x42, 0xea, 0xd7, 0xbf, 0x0a, 0xb3, 0x55, 0xc7, 0xdf, - 0xde, 0xdd, 0x32, 0x2b, 0xb4, 0x6e, 0x49, 0x7a, 0xf1, 0x67, 0x8e, 0xd9, 0x0f, 0x2d, 0xff, 0x51, - 0x83, 0xb0, 0xf6, 0x1a, 0x56, 0xca, 0x90, 0x20, 0x81, 0xa1, 0xc3, 0x10, 0xe7, 0x5a, 0xaa, 0xf8, - 0x4e, 0x93, 0x84, 0xe8, 0x8c, 0x35, 0x18, 0xef, 0x96, 0x53, 0xe4, 0x13, 0x70, 0x05, 0xf3, 0x74, - 0x80, 0xfb, 0x72, 0x29, 0x2d, 0x62, 0xa2, 0xcd, 0x47, 0x30, 0xc8, 0xdb, 0x7c, 0x48, 0x88, 0x4d, - 0xbc, 0x55, 0x52, 0x23, 0x55, 0xbe, 0x1b, 0xe8, 0x16, 0x64, 0x9b, 0xb8, 0xe6, 0xd8, 0xd8, 0xa7, - 0x5e, 0x19, 0xdb, 0xb6, 0x27, 0xa7, 0x97, 0x51, 0xd1, 0x25, 0xdb, 0xf6, 0x02, 0x53, 0xfc, 0x00, - 0xc6, 0x12, 0x3b, 0x29, 0x9a, 0x02, 0xa4, 0xbf, 0xe6, 0xb9, 0x60, 0x3b, 0x10, 0xa1, 0x56, 0x2f, - 0x63, 0x05, 0x72, 0xbc, 0xc3, 0x67, 0x0e, 0x63, 0x2b, 0x74, 0xd7, 0xf5, 0x89, 0x77, 0x76, 0x8c, - 0xf7, 0xe4, 0xcc, 0x02, 0x4d, 0x82, 0xf3, 0xa8, 0x3b, 0x8c, 0x95, 0x2b, 0x22, 0xce, 0x5b, 0x9d, - 0x2f, 0xa5, 0xeb, 0x9d, 0x52, 0x03, 0x49, 0x86, 0x8d, 0x1a, 0x66, 0xdb, 0x0f, 0x1c, 0xd7, 0xa6, - 0x7b, 0xc6, 0x8a, 0x6c, 0x19, 0x88, 0xa9, 0x96, 0x53, 0x70, 0x75, 0x8f, 0x47, 0xca, 0x0d, 0x8f, - 0x56, 0x3d, 0xc2, 0x98, 0xec, 0x9a, 0x15, 0xe1, 0x75, 0x19, 0x55, 0x83, 0x5e, 0xaa, 0x56, 0xbd, - 0xd6, 0x64, 0xc8, 0xba, 0x47, 0x9a, 0xd4, 0x27, 0x67, 0x7f, 0xc2, 0xef, 0xe4, 0xa0, 0xa3, 0x9d, - 0x14, 0xd3, 0x97, 0x70, 0x0d, 0xb7, 0x73, 0xe5, 0x86, 0x48, 0xf2, 0xa6, 0xe9, 0xf9, 0x59, 0x33, - 0x74, 0x40, 0x4d, 0xd5, 0x23, 0xf8, 0x02, 0xc9, 0x7e, 0xcb, 0xe7, 0x5b, 0xaf, 0x70, 0x29, 0x87, - 0x23, 0x3a, 0xc6, 0x10, 0xbc, 0x96, 0x08, 0xc0, 0x8c, 0xa7, 0x1a, 0xe4, 0x93, 0x53, 0x0a, 0xee, - 0x2b, 0x40, 0x31, 0xb8, 0xf6, 0x89, 0x7a, 0x09, 0xba, 0x6b, 0x38, 0x06, 0xb1, 0x26, 0x2f, 0x01, - 0xb5, 0x7a, 0xf3, 0xa5, 0xc6, 0xcc, 0xe4, 0xa5, 0x10, 0x6a, 0xa3, 0x1e, 0xe3, 0x73, 0xc8, 0x76, - 0x1e, 0x23, 0x30, 0xe0, 0xe9, 0x7e, 0x1e, 0x61, 0xb3, 0xc3, 0x9f, 0xc1, 0xc1, 0xf6, 0xc6, 0x20, - 0x5c, 0x8f, 0x8b, 0x32, 0xa3, 0x09, 0x23, 0x09, 0x61, 0x05, 0xf3, 0x00, 0xae, 0x86, 0x61, 0xda, - 0x03, 0x3d, 0x2b, 0x4d, 0x16, 0x87, 0x75, 0x33, 0x90, 0xe6, 0xba, 0xeb, 0xd8, 0xc3, 0x75, 0x66, - 0x7c, 0x2c, 0xe9, 0xc4, 0x47, 0x25, 0xbf, 0x00, 0x17, 0x1b, 0x3c, 0x22, 0x67, 0x30, 0x18, 0x51, - 0x15, 0xe5, 0x52, 0x42, 0x96, 0x1a, 0x9f, 0xc2, 0x15, 0x71, 0x4e, 0x89, 0xed, 0x60, 0xb7, 0xcb, - 0x25, 0x8d, 0x46, 0xe1, 0xb2, 0xbb, 0x5b, 0xdf, 0xf0, 0x71, 0xbd, 0xc1, 0x86, 0xce, 0x8d, 0x6b, - 0xd3, 0x99, 0x52, 0x27, 0x10, 0xd8, 0xac, 0xfb, 0x30, 0x10, 0xec, 0xa6, 0xd0, 0x16, 0xe1, 0x52, - 0x5d, 0x84, 0xe4, 0x44, 0x86, 0xa3, 0x6c, 0x9e, 0x53, 0x21, 0xbc, 0x9d, 0xe4, 0x6b, 0xd7, 0x1b, - 0x77, 0xe5, 0x81, 0x15, 0x2d, 0x57, 0x49, 0xd3, 0x11, 0x36, 0xd5, 0xd3, 0x4e, 0x6a, 0xf2, 0x7c, - 0x46, 0x17, 0x2a, 0xa8, 0x4f, 0x20, 0x57, 0x8f, 0xe4, 0xfa, 0xa5, 0x8b, 0x2d, 0x34, 0x86, 0xe1, - 0x06, 0x57, 0xdb, 0x6c, 0xbf, 0xc6, 0x25, 0xb2, 0x87, 0x3d, 0x7b, 0x83, 0xf8, 0xc6, 0x0e, 0x14, - 0xba, 0xa4, 0x14, 0xca, 0x3d, 0x00, 0xf5, 0xfe, 0xb7, 0xb7, 0x6f, 0x22, 0x02, 0x11, 0x5f, 0x2e, - 0x61, 0x02, 0x4b, 0xe7, 0x7f, 0xb9, 0x0a, 0x17, 0xb8, 0x18, 0x3a, 0xd0, 0x20, 0x13, 0xf6, 0xdf, - 0x68, 0xc3, 0xb8, 0xd7, 0xea, 0x33, 0x3d, 0x4b, 0xda, 0xc8, 0xc6, 0x9d, 0xa7, 0xbf, 0xff, 0x7b, - 0x70, 0xce, 0x44, 0xb7, 0xad, 0xf0, 0x17, 0x05, 0xbe, 0x0d, 0xcc, 0x0a, 0x5b, 0xb5, 0xf5, 0x98, - 0x87, 0x9f, 0xa0, 0xe7, 0x1a, 0x5c, 0x4f, 0xb0, 0x4a, 0x34, 0x95, 0x24, 0x9c, 0x50, 0xa8, 0x5b, - 0x7d, 0x16, 0x2a, 0xce, 0x05, 0xce, 0x39, 0x87, 0x66, 0x93, 0x39, 0xa5, 0x31, 0x87, 0x71, 0xd1, - 0xcf, 0x1a, 0xe4, 0x62, 0x56, 0x7c, 0x33, 0x49, 0x3a, 0x5a, 0xa5, 0xdf, 0xee, 0xa7, 0x4a, 0xd1, - 0x2d, 0x72, 0xba, 0x05, 0x54, 0x8c, 0xd0, 0x75, 0xb6, 0xd4, 0x7a, 0x1c, 0xbe, 0x2f, 0x9f, 0x58, - 0xc2, 0xaa, 0xd1, 0x33, 0x0d, 0xd2, 0x41, 0x8b, 0x2e, 0x24, 0x09, 0x07, 0x0a, 0xf4, 0xa9, 0x1e, - 0x05, 0x0a, 0xea, 0x2e, 0x87, 0x2a, 0x22, 0xeb, 0x0c, 0x50, 0x2d, 0xf3, 0x46, 0xdf, 0x42, 0x3a, - 0x60, 0xce, 0xc9, 0x44, 0x81, 0x82, 0x64, 0xa2, 0x04, 0x7b, 0x37, 0x26, 0x39, 0xd1, 0x18, 0x1a, - 0x89, 0x10, 0xb1, 0x56, 0x6d, 0x59, 0x58, 0x3c, 0xfa, 0x4d, 0x83, 0x5c, 0xcc, 0xd6, 0x13, 0x37, - 0x2d, 0x5a, 0x95, 0xbc, 0x69, 0xdd, 0x8c, 0xdd, 0x58, 0xe5, 0x34, 0xef, 0xa3, 0x77, 0xcf, 0x30, - 0x9f, 0x98, 0xd9, 0xa2, 0x9f, 0x34, 0xb8, 0x16, 0xf3, 0x67, 0x74, 0xab, 0x1f, 0x12, 0xa6, 0xcf, - 0xf5, 0x55, 0xd6, 0xf3, 0xb0, 0x06, 0x88, 0xe3, 0xdf, 0x06, 0xd0, 0xa1, 0x06, 0x99, 0xb0, 0x7b, - 0x4f, 0x9c, 0x2a, 0xdb, 0x2a, 0x49, 0xbe, 0x42, 0x12, 0xcd, 0xdb, 0x58, 0xe2, 0x54, 0xef, 0xa0, - 0xc5, 0x38, 0x95, 0xed, 0xf4, 0x9c, 0x23, 0x1f, 0xe2, 0x81, 0x06, 0xd9, 0xb0, 0x1b, 0x23, 0xa3, - 0x27, 0x00, 0xd3, 0xdf, 0xe8, 0x5d, 0xa3, 0x28, 0x8b, 0x9c, 0x72, 0x16, 0xcd, 0xf4, 0x33, 0x3b, - 0x31, 0xb8, 0x2a, 0x5c, 0x14, 0x66, 0x8b, 0xf4, 0x24, 0x21, 0x91, 0xd3, 0x8d, 0xee, 0x39, 0x25, - 0x3e, 0xc6, 0xc5, 0x6f, 0xa0, 0xc1, 0x88, 0xb8, 0x70, 0x6f, 0xd4, 0x84, 0x4b, 0x6d, 0xe3, 0x1e, - 0x49, 0x3c, 0xdd, 0x22, 0xa9, 0x4f, 0x9e, 0x92, 0x54, 0x5a, 0x33, 0x5c, 0x6b, 0x12, 0x4d, 0x70, - 0xad, 0x6d, 0x87, 0xf9, 0xb1, 0xdb, 0x52, 0x9a, 0x32, 0xfa, 0x51, 0x83, 0x5c, 0xcc, 0x90, 0x6f, - 0x76, 0x17, 0xe9, 0x54, 0x25, 0x1f, 0xb5, 0x6e, 0x1e, 0x1d, 0xb9, 0xbd, 0x4f, 0x61, 0x2a, 0xdb, - 0x1d, 0x90, 0xe7, 0x1a, 0xa0, 0xb8, 0x5b, 0xa2, 0xd7, 0x93, 0x94, 0xe3, 0x75, 0xba, 0xd9, 0x5f, - 0x9d, 0x62, 0x7c, 0x8b, 0x33, 0xbe, 0x89, 0xcc, 0xee, 0xaf, 0x71, 0xe7, 0x2d, 0xf6, 0xf8, 0xf2, - 0x32, 0x23, 0xfe, 0xf2, 0xbd, 0xa3, 0x7f, 0xf2, 0xa9, 0xa3, 0xe3, 0xbc, 0xf6, 0xe2, 0x38, 0xaf, - 0xfd, 0x7d, 0x9c, 0xd7, 0x9e, 0x9d, 0xe4, 0x53, 0x2f, 0x4e, 0xf2, 0xa9, 0x3f, 0x4e, 0xf2, 0xa9, - 0x2f, 0x66, 0x02, 0x3f, 0x58, 0xe9, 0x0e, 0x9d, 0x73, 0x89, 0xbf, 0x47, 0xbd, 0x87, 0x5c, 0x63, - 0xbf, 0xad, 0xc2, 0x7f, 0xb7, 0x6e, 0x5d, 0xe4, 0xbf, 0xba, 0x17, 0xfe, 0x0f, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x8d, 0x37, 0xdf, 0x11, 0x10, 0x00, 0x00, +func (m *QueryLatestPricesRequest) Reset() { *m = QueryLatestPricesRequest{} } +func (m *QueryLatestPricesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLatestPricesRequest) ProtoMessage() {} +func (*QueryLatestPricesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{26} +} +func (m *QueryLatestPricesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLatestPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLatestPricesRequest.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 *QueryLatestPricesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLatestPricesRequest.Merge(m, src) +} +func (m *QueryLatestPricesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLatestPricesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLatestPricesRequest.DiscardUnknown(m) } -// 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 +var xxx_messageInfo_QueryLatestPricesRequest proto.InternalMessageInfo -// 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) +// QueryLatestPricesResponse is the response type for the Query/LatestPrices RPC method. +type QueryLatestPricesResponse struct { + Prices []*LatestPrice `protobuf:"bytes,1,rep,name=prices,proto3" json:"prices,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -type queryClient struct { - cc grpc1.ClientConn +func (m *QueryLatestPricesResponse) Reset() { *m = QueryLatestPricesResponse{} } +func (m *QueryLatestPricesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLatestPricesResponse) ProtoMessage() {} +func (*QueryLatestPricesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{27} } - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func (m *QueryLatestPricesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *queryClient) ExchangeRates(ctx context.Context, in *QueryExchangeRates, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) { - out := new(QueryExchangeRatesResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/ExchangeRates", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryLatestPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLatestPricesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - 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, "/ojo.oracle.v1.Query/ActiveExchangeRates", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QueryLatestPricesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLatestPricesResponse.Merge(m, src) } - -func (c *queryClient) FeederDelegation(ctx context.Context, in *QueryFeederDelegation, opts ...grpc.CallOption) (*QueryFeederDelegationResponse, error) { - out := new(QueryFeederDelegationResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/FeederDelegation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QueryLatestPricesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLatestPricesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLatestPricesResponse.DiscardUnknown(m) } -func (c *queryClient) MissCounter(ctx context.Context, in *QueryMissCounter, opts ...grpc.CallOption) (*QueryMissCounterResponse, error) { - out := new(QueryMissCounterResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/MissCounter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_QueryLatestPricesResponse proto.InternalMessageInfo + +// QueryAllLatestPricesRequest is the request type for the Query/AllLatestPrices RPC method. +type QueryAllLatestPricesRequest struct { } -func (c *queryClient) SlashWindow(ctx context.Context, in *QuerySlashWindow, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) { - out := new(QuerySlashWindowResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/SlashWindow", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryAllLatestPricesRequest) Reset() { *m = QueryAllLatestPricesRequest{} } +func (m *QueryAllLatestPricesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllLatestPricesRequest) ProtoMessage() {} +func (*QueryAllLatestPricesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{28} +} +func (m *QueryAllLatestPricesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllLatestPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllLatestPricesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryAllLatestPricesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllLatestPricesRequest.Merge(m, src) +} +func (m *QueryAllLatestPricesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllLatestPricesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllLatestPricesRequest.DiscardUnknown(m) } -func (c *queryClient) AggregatePrevote(ctx context.Context, in *QueryAggregatePrevote, opts ...grpc.CallOption) (*QueryAggregatePrevoteResponse, error) { - out := new(QueryAggregatePrevoteResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregatePrevote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_QueryAllLatestPricesRequest proto.InternalMessageInfo + +// QueryAllLatestPricesResponse is the response type for the Query/AllLatestPrices RPC method. +type QueryAllLatestPricesResponse struct { + Prices []*LatestPrice `protobuf:"bytes,1,rep,name=prices,proto3" json:"prices,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (c *queryClient) AggregatePrevotes(ctx context.Context, in *QueryAggregatePrevotes, opts ...grpc.CallOption) (*QueryAggregatePrevotesResponse, error) { - out := new(QueryAggregatePrevotesResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregatePrevotes", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryAllLatestPricesResponse) Reset() { *m = QueryAllLatestPricesResponse{} } +func (m *QueryAllLatestPricesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllLatestPricesResponse) ProtoMessage() {} +func (*QueryAllLatestPricesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{29} +} +func (m *QueryAllLatestPricesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllLatestPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllLatestPricesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryAllLatestPricesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllLatestPricesResponse.Merge(m, src) +} +func (m *QueryAllLatestPricesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllLatestPricesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllLatestPricesResponse.DiscardUnknown(m) } -func (c *queryClient) AggregateVote(ctx context.Context, in *QueryAggregateVote, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) { - out := new(QueryAggregateVoteResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregateVote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_QueryAllLatestPricesResponse proto.InternalMessageInfo + +// QueryPriceHistoryRequest is the request type for the Query/PriceHistory RPC method. +type QueryPriceHistoryRequest struct { + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` } -func (c *queryClient) AggregateVotes(ctx context.Context, in *QueryAggregateVotes, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) { - out := new(QueryAggregateVotesResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregateVotes", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryPriceHistoryRequest) Reset() { *m = QueryPriceHistoryRequest{} } +func (m *QueryPriceHistoryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPriceHistoryRequest) ProtoMessage() {} +func (*QueryPriceHistoryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{30} +} +func (m *QueryPriceHistoryRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPriceHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPriceHistoryRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryPriceHistoryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPriceHistoryRequest.Merge(m, src) +} +func (m *QueryPriceHistoryRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPriceHistoryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPriceHistoryRequest.DiscardUnknown(m) } -func (c *queryClient) Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_QueryPriceHistoryRequest proto.InternalMessageInfo + +// QueryPriceHistoryResponse is the response type for the Query/PriceHistory RPC method. +type QueryPriceHistoryResponse struct { + Prices []*Price `protobuf:"bytes,1,rep,name=prices,proto3" json:"prices,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (c *queryClient) Medians(ctx context.Context, in *QueryMedians, opts ...grpc.CallOption) (*QueryMediansResponse, error) { - out := new(QueryMediansResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/Medians", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryPriceHistoryResponse) Reset() { *m = QueryPriceHistoryResponse{} } +func (m *QueryPriceHistoryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPriceHistoryResponse) ProtoMessage() {} +func (*QueryPriceHistoryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{31} +} +func (m *QueryPriceHistoryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPriceHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPriceHistoryResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryPriceHistoryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPriceHistoryResponse.Merge(m, src) +} +func (m *QueryPriceHistoryResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPriceHistoryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPriceHistoryResponse.DiscardUnknown(m) } -func (c *queryClient) MedianDeviations(ctx context.Context, in *QueryMedianDeviations, opts ...grpc.CallOption) (*QueryMedianDeviationsResponse, error) { - out := new(QueryMedianDeviationsResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/MedianDeviations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_QueryPriceHistoryResponse proto.InternalMessageInfo + +// QueryPoolRequest is the request type for the Query/PoolRequest RPC method. +type QueryPoolRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` } -func (c *queryClient) ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) { - out := new(QueryValidatorRewardSetResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/ValidatorRewardSet", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryPoolRequest) Reset() { *m = QueryPoolRequest{} } +func (m *QueryPoolRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolRequest) ProtoMessage() {} +func (*QueryPoolRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{32} +} +func (m *QueryPoolRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - 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) +func (m *QueryPoolRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolRequest.Merge(m, src) +} +func (m *QueryPoolRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolRequest.DiscardUnknown(m) } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +var xxx_messageInfo_QueryPoolRequest proto.InternalMessageInfo + +// QueryPoolResponse is the response type for the Query/PoolResponse RPC method. +type QueryPoolResponse struct { + Pool Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"` } -func (*UnimplementedQueryServer) ExchangeRates(ctx context.Context, req *QueryExchangeRates) (*QueryExchangeRatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExchangeRates not implemented") +func (m *QueryPoolResponse) Reset() { *m = QueryPoolResponse{} } +func (m *QueryPoolResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolResponse) ProtoMessage() {} +func (*QueryPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{33} } -func (*UnimplementedQueryServer) ActiveExchangeRates(ctx context.Context, req *QueryActiveExchangeRates) (*QueryActiveExchangeRatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActiveExchangeRates not implemented") +func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) FeederDelegation(ctx context.Context, req *QueryFeederDelegation) (*QueryFeederDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FeederDelegation not implemented") +func (m *QueryPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolResponse.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 (*UnimplementedQueryServer) MissCounter(ctx context.Context, req *QueryMissCounter) (*QueryMissCounterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MissCounter not implemented") +func (m *QueryPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolResponse.Merge(m, src) } -func (*UnimplementedQueryServer) SlashWindow(ctx context.Context, req *QuerySlashWindow) (*QuerySlashWindowResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SlashWindow not implemented") +func (m *QueryPoolResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) AggregatePrevote(ctx context.Context, req *QueryAggregatePrevote) (*QueryAggregatePrevoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevote not implemented") +func (m *QueryPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolResponse.DiscardUnknown(m) } -func (*UnimplementedQueryServer) AggregatePrevotes(ctx context.Context, req *QueryAggregatePrevotes) (*QueryAggregatePrevotesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevotes not implemented") + +var xxx_messageInfo_QueryPoolResponse proto.InternalMessageInfo + +// QueryPoolAllRequest is the request type for the Query/PoolAllRequest RPC method. +type QueryPoolAllRequest struct { } -func (*UnimplementedQueryServer) AggregateVote(ctx context.Context, req *QueryAggregateVote) (*QueryAggregateVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AggregateVote not implemented") + +func (m *QueryPoolAllRequest) Reset() { *m = QueryPoolAllRequest{} } +func (m *QueryPoolAllRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPoolAllRequest) ProtoMessage() {} +func (*QueryPoolAllRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{34} } -func (*UnimplementedQueryServer) AggregateVotes(ctx context.Context, req *QueryAggregateVotes) (*QueryAggregateVotesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AggregateVotes not implemented") +func (m *QueryPoolAllRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +func (m *QueryPoolAllRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolAllRequest.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 (*UnimplementedQueryServer) Medians(ctx context.Context, req *QueryMedians) (*QueryMediansResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Medians not implemented") +func (m *QueryPoolAllRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolAllRequest.Merge(m, src) } -func (*UnimplementedQueryServer) MedianDeviations(ctx context.Context, req *QueryMedianDeviations) (*QueryMedianDeviationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MedianDeviations not implemented") +func (m *QueryPoolAllRequest) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) ValidatorRewardSet(ctx context.Context, req *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorRewardSet not implemented") +func (m *QueryPoolAllRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolAllRequest.DiscardUnknown(m) } -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +var xxx_messageInfo_QueryPoolAllRequest proto.InternalMessageInfo + +// QueryPoolAllResponse is the response type for the Query/PoolAllResponse RPC method. +type QueryPoolAllResponse struct { + Pool []Pool `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool"` } -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: "/ojo.oracle.v1.Query/ExchangeRates", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ExchangeRates(ctx, req.(*QueryExchangeRates)) +func (m *QueryPoolAllResponse) Reset() { *m = QueryPoolAllResponse{} } +func (m *QueryPoolAllResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolAllResponse) ProtoMessage() {} +func (*QueryPoolAllResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{35} +} +func (m *QueryPoolAllResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPoolAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolAllResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryPoolAllResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolAllResponse.Merge(m, src) +} +func (m *QueryPoolAllResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPoolAllResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolAllResponse.DiscardUnknown(m) } -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: "/ojo.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) +var xxx_messageInfo_QueryPoolAllResponse proto.InternalMessageInfo + +// QueryAccountedPoolRequest is the request type for the Query/AccountedPoolRequest RPC method. +type QueryAccountedPoolRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` } -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: "/ojo.oracle.v1.Query/FeederDelegation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).FeederDelegation(ctx, req.(*QueryFeederDelegation)) +func (m *QueryAccountedPoolRequest) Reset() { *m = QueryAccountedPoolRequest{} } +func (m *QueryAccountedPoolRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountedPoolRequest) ProtoMessage() {} +func (*QueryAccountedPoolRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{36} +} +func (m *QueryAccountedPoolRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountedPoolRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountedPoolRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryAccountedPoolRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountedPoolRequest.Merge(m, src) +} +func (m *QueryAccountedPoolRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountedPoolRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountedPoolRequest.DiscardUnknown(m) } -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: "/ojo.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) +var xxx_messageInfo_QueryAccountedPoolRequest proto.InternalMessageInfo + +// QueryAccountedPoolResponse is the response type for the Query/AccountedPoolResponse RPC method. +type QueryAccountedPoolResponse struct { + AccountedPool AccountedPool `protobuf:"bytes,1,opt,name=accounted_pool,json=accountedPool,proto3" json:"accounted_pool"` } -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: "/ojo.oracle.v1.Query/SlashWindow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SlashWindow(ctx, req.(*QuerySlashWindow)) +func (m *QueryAccountedPoolResponse) Reset() { *m = QueryAccountedPoolResponse{} } +func (m *QueryAccountedPoolResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountedPoolResponse) ProtoMessage() {} +func (*QueryAccountedPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{37} +} +func (m *QueryAccountedPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountedPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountedPoolResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryAccountedPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountedPoolResponse.Merge(m, src) +} +func (m *QueryAccountedPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountedPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountedPoolResponse.DiscardUnknown(m) } -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: "/ojo.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) +var xxx_messageInfo_QueryAccountedPoolResponse proto.InternalMessageInfo + +// QueryAccountedPoolAllRequest is the request type for the Query/AccountedPoolAllRequest RPC method. +type QueryAccountedPoolAllRequest struct { } -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: "/ojo.oracle.v1.Query/AggregatePrevotes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AggregatePrevotes(ctx, req.(*QueryAggregatePrevotes)) +func (m *QueryAccountedPoolAllRequest) Reset() { *m = QueryAccountedPoolAllRequest{} } +func (m *QueryAccountedPoolAllRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountedPoolAllRequest) ProtoMessage() {} +func (*QueryAccountedPoolAllRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{38} +} +func (m *QueryAccountedPoolAllRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountedPoolAllRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountedPoolAllRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryAccountedPoolAllRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountedPoolAllRequest.Merge(m, src) +} +func (m *QueryAccountedPoolAllRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountedPoolAllRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountedPoolAllRequest.DiscardUnknown(m) } -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: "/ojo.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) +var xxx_messageInfo_QueryAccountedPoolAllRequest proto.InternalMessageInfo + +// QueryAccountedPoolAllResponse is the response type for the Query/AccountedPoolAllResponse RPC method. +type QueryAccountedPoolAllResponse struct { + AccountedPool []AccountedPool `protobuf:"bytes,1,rep,name=accounted_pool,json=accountedPool,proto3" json:"accounted_pool"` } -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: "/ojo.oracle.v1.Query/AggregateVotes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AggregateVotes(ctx, req.(*QueryAggregateVotes)) +func (m *QueryAccountedPoolAllResponse) Reset() { *m = QueryAccountedPoolAllResponse{} } +func (m *QueryAccountedPoolAllResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountedPoolAllResponse) ProtoMessage() {} +func (*QueryAccountedPoolAllResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{39} +} +func (m *QueryAccountedPoolAllResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountedPoolAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountedPoolAllResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryAccountedPoolAllResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountedPoolAllResponse.Merge(m, src) +} +func (m *QueryAccountedPoolAllResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountedPoolAllResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountedPoolAllResponse.DiscardUnknown(m) } -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: "/ojo.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) +var xxx_messageInfo_QueryAccountedPoolAllResponse proto.InternalMessageInfo + +// QueryAssetInfoRequest is the request type for the Query/AssetInfoRequest RPC method. +type QueryAssetInfoRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } -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: "/ojo.oracle.v1.Query/Medians", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Medians(ctx, req.(*QueryMedians)) +func (m *QueryAssetInfoRequest) Reset() { *m = QueryAssetInfoRequest{} } +func (m *QueryAssetInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAssetInfoRequest) ProtoMessage() {} +func (*QueryAssetInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{40} +} +func (m *QueryAssetInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAssetInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAssetInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryAssetInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAssetInfoRequest.Merge(m, src) +} +func (m *QueryAssetInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAssetInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAssetInfoRequest.DiscardUnknown(m) } -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: "/ojo.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) +var xxx_messageInfo_QueryAssetInfoRequest proto.InternalMessageInfo + +// QueryAssetInfoResponse is the response type for the Query/AssetInfoResponse RPC method. +type QueryAssetInfoResponse struct { + AssetInfo AssetInfo `protobuf:"bytes,1,opt,name=asset_info,json=assetInfo,proto3" json:"asset_info"` } -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: "/ojo.oracle.v1.Query/ValidatorRewardSet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorRewardSet(ctx, req.(*QueryValidatorRewardSet)) +func (m *QueryAssetInfoResponse) Reset() { *m = QueryAssetInfoResponse{} } +func (m *QueryAssetInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAssetInfoResponse) ProtoMessage() {} +func (*QueryAssetInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{41} +} +func (m *QueryAssetInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAssetInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAssetInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryAssetInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAssetInfoResponse.Merge(m, src) +} +func (m *QueryAssetInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAssetInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAssetInfoResponse.DiscardUnknown(m) } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ojo.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, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ojo/oracle/v1/query.proto", +var xxx_messageInfo_QueryAssetInfoResponse proto.InternalMessageInfo + +// QueryAssetInfoAllRequest is the request type for the Query/AssetInfoAllRequest RPC method. +type QueryAssetInfoAllRequest struct { } -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 +func (m *QueryAssetInfoAllRequest) Reset() { *m = QueryAssetInfoAllRequest{} } +func (m *QueryAssetInfoAllRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAssetInfoAllRequest) ProtoMessage() {} +func (*QueryAssetInfoAllRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{42} +} +func (m *QueryAssetInfoAllRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAssetInfoAllRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAssetInfoAllRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *QueryAssetInfoAllRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAssetInfoAllRequest.Merge(m, src) +} +func (m *QueryAssetInfoAllRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAssetInfoAllRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAssetInfoAllRequest.DiscardUnknown(m) } -func (m *QueryExchangeRates) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_QueryAssetInfoAllRequest proto.InternalMessageInfo + +// QueryAssetInfoAllResponse is the response type for the Query/AssetInfoAllResponse RPC method. +type QueryAssetInfoAllResponse struct { + AssetInfo []AssetInfo `protobuf:"bytes,1,rep,name=asset_info,json=assetInfo,proto3" json:"asset_info"` } -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 *QueryAssetInfoAllResponse) Reset() { *m = QueryAssetInfoAllResponse{} } +func (m *QueryAssetInfoAllResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAssetInfoAllResponse) ProtoMessage() {} +func (*QueryAssetInfoAllResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{43} } - -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 +func (m *QueryAssetInfoAllResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAssetInfoAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAssetInfoAllResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *QueryAssetInfoAllResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAssetInfoAllResponse.Merge(m, src) +} +func (m *QueryAssetInfoAllResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAssetInfoAllResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAssetInfoAllResponse.DiscardUnknown(m) } -func (m *QueryExchangeRatesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_QueryAssetInfoAllResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryExchangeRates)(nil), "ojo.oracle.v1.QueryExchangeRates") + proto.RegisterType((*QueryExchangeRatesResponse)(nil), "ojo.oracle.v1.QueryExchangeRatesResponse") + proto.RegisterType((*QueryActiveExchangeRates)(nil), "ojo.oracle.v1.QueryActiveExchangeRates") + proto.RegisterType((*QueryActiveExchangeRatesResponse)(nil), "ojo.oracle.v1.QueryActiveExchangeRatesResponse") + proto.RegisterType((*QueryFeederDelegation)(nil), "ojo.oracle.v1.QueryFeederDelegation") + proto.RegisterType((*QueryFeederDelegationResponse)(nil), "ojo.oracle.v1.QueryFeederDelegationResponse") + proto.RegisterType((*QueryMissCounter)(nil), "ojo.oracle.v1.QueryMissCounter") + proto.RegisterType((*QueryMissCounterResponse)(nil), "ojo.oracle.v1.QueryMissCounterResponse") + proto.RegisterType((*QuerySlashWindow)(nil), "ojo.oracle.v1.QuerySlashWindow") + proto.RegisterType((*QuerySlashWindowResponse)(nil), "ojo.oracle.v1.QuerySlashWindowResponse") + proto.RegisterType((*QueryAggregatePrevote)(nil), "ojo.oracle.v1.QueryAggregatePrevote") + proto.RegisterType((*QueryAggregatePrevoteResponse)(nil), "ojo.oracle.v1.QueryAggregatePrevoteResponse") + proto.RegisterType((*QueryAggregatePrevotes)(nil), "ojo.oracle.v1.QueryAggregatePrevotes") + proto.RegisterType((*QueryAggregatePrevotesResponse)(nil), "ojo.oracle.v1.QueryAggregatePrevotesResponse") + proto.RegisterType((*QueryAggregateVote)(nil), "ojo.oracle.v1.QueryAggregateVote") + proto.RegisterType((*QueryAggregateVoteResponse)(nil), "ojo.oracle.v1.QueryAggregateVoteResponse") + proto.RegisterType((*QueryAggregateVotes)(nil), "ojo.oracle.v1.QueryAggregateVotes") + proto.RegisterType((*QueryAggregateVotesResponse)(nil), "ojo.oracle.v1.QueryAggregateVotesResponse") + proto.RegisterType((*QueryParams)(nil), "ojo.oracle.v1.QueryParams") + proto.RegisterType((*QueryParamsResponse)(nil), "ojo.oracle.v1.QueryParamsResponse") + proto.RegisterType((*QueryMedians)(nil), "ojo.oracle.v1.QueryMedians") + proto.RegisterType((*QueryMediansResponse)(nil), "ojo.oracle.v1.QueryMediansResponse") + proto.RegisterType((*QueryMedianDeviations)(nil), "ojo.oracle.v1.QueryMedianDeviations") + proto.RegisterType((*QueryMedianDeviationsResponse)(nil), "ojo.oracle.v1.QueryMedianDeviationsResponse") + proto.RegisterType((*QueryValidatorRewardSet)(nil), "ojo.oracle.v1.QueryValidatorRewardSet") + proto.RegisterType((*QueryValidatorRewardSetResponse)(nil), "ojo.oracle.v1.QueryValidatorRewardSetResponse") + proto.RegisterType((*QueryLatestPricesRequest)(nil), "ojo.oracle.v1.QueryLatestPricesRequest") + proto.RegisterType((*QueryLatestPricesResponse)(nil), "ojo.oracle.v1.QueryLatestPricesResponse") + proto.RegisterType((*QueryAllLatestPricesRequest)(nil), "ojo.oracle.v1.QueryAllLatestPricesRequest") + proto.RegisterType((*QueryAllLatestPricesResponse)(nil), "ojo.oracle.v1.QueryAllLatestPricesResponse") + proto.RegisterType((*QueryPriceHistoryRequest)(nil), "ojo.oracle.v1.QueryPriceHistoryRequest") + proto.RegisterType((*QueryPriceHistoryResponse)(nil), "ojo.oracle.v1.QueryPriceHistoryResponse") + proto.RegisterType((*QueryPoolRequest)(nil), "ojo.oracle.v1.QueryPoolRequest") + proto.RegisterType((*QueryPoolResponse)(nil), "ojo.oracle.v1.QueryPoolResponse") + proto.RegisterType((*QueryPoolAllRequest)(nil), "ojo.oracle.v1.QueryPoolAllRequest") + proto.RegisterType((*QueryPoolAllResponse)(nil), "ojo.oracle.v1.QueryPoolAllResponse") + proto.RegisterType((*QueryAccountedPoolRequest)(nil), "ojo.oracle.v1.QueryAccountedPoolRequest") + proto.RegisterType((*QueryAccountedPoolResponse)(nil), "ojo.oracle.v1.QueryAccountedPoolResponse") + proto.RegisterType((*QueryAccountedPoolAllRequest)(nil), "ojo.oracle.v1.QueryAccountedPoolAllRequest") + proto.RegisterType((*QueryAccountedPoolAllResponse)(nil), "ojo.oracle.v1.QueryAccountedPoolAllResponse") + proto.RegisterType((*QueryAssetInfoRequest)(nil), "ojo.oracle.v1.QueryAssetInfoRequest") + proto.RegisterType((*QueryAssetInfoResponse)(nil), "ojo.oracle.v1.QueryAssetInfoResponse") + proto.RegisterType((*QueryAssetInfoAllRequest)(nil), "ojo.oracle.v1.QueryAssetInfoAllRequest") + proto.RegisterType((*QueryAssetInfoAllResponse)(nil), "ojo.oracle.v1.QueryAssetInfoAllResponse") } -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 init() { proto.RegisterFile("ojo/oracle/v1/query.proto", fileDescriptor_ac3bb5b34dcda556) } + +var fileDescriptor_ac3bb5b34dcda556 = []byte{ + // 1847 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x99, 0x5b, 0x6f, 0xdc, 0xc6, + 0x15, 0xc7, 0xc5, 0xd8, 0x96, 0xab, 0xb3, 0x5a, 0x59, 0x1e, 0xcb, 0xb1, 0x44, 0xcb, 0x2b, 0x79, + 0x7c, 0x91, 0x64, 0x49, 0x4b, 0xdd, 0xd0, 0xd4, 0x69, 0x53, 0x54, 0xb7, 0x24, 0x6e, 0x53, 0x40, + 0x59, 0xa3, 0x36, 0x90, 0x87, 0x6e, 0xa9, 0xe5, 0x78, 0x45, 0x85, 0xcb, 0xd9, 0x70, 0xa8, 0x95, + 0x15, 0x55, 0x28, 0x90, 0xa7, 0x3e, 0xb5, 0x41, 0x0d, 0x14, 0x45, 0xf3, 0x10, 0x17, 0xc8, 0x53, + 0xd1, 0x0f, 0xe2, 0x47, 0x03, 0x7d, 0xe9, 0x53, 0x2f, 0x76, 0x81, 0xf6, 0x63, 0x14, 0x9c, 0x19, + 0x72, 0x87, 0xe4, 0x50, 0xbb, 0x32, 0xfa, 0x90, 0xa7, 0x64, 0xe7, 0x9c, 0x39, 0xe7, 0x37, 0x87, + 0x73, 0x39, 0x7f, 0x0b, 0x26, 0xe8, 0x3e, 0xb5, 0x68, 0x60, 0x37, 0x3c, 0x62, 0x75, 0x96, 0xad, + 0xcf, 0x0e, 0x48, 0x70, 0x54, 0x6d, 0x07, 0x34, 0xa4, 0xa8, 0x4c, 0xf7, 0x69, 0x55, 0x98, 0xaa, + 0x9d, 0x65, 0x73, 0xac, 0x49, 0x9b, 0x94, 0x5b, 0xac, 0xe8, 0xff, 0x84, 0x93, 0x39, 0xd9, 0xa4, + 0xb4, 0xe9, 0x11, 0xcb, 0x6e, 0xbb, 0x96, 0xed, 0xfb, 0x34, 0xb4, 0x43, 0x97, 0xfa, 0x4c, 0x5a, + 0xcd, 0x74, 0x74, 0x19, 0x4c, 0xd8, 0xc6, 0xd3, 0x36, 0xe2, 0x1d, 0xc5, 0xb3, 0x2a, 0x0d, 0xca, + 0x5a, 0x94, 0x59, 0xbb, 0x36, 0x8b, 0x4c, 0xbb, 0x24, 0xb4, 0x97, 0xad, 0x06, 0x75, 0x7d, 0x69, + 0xbf, 0xa7, 0xda, 0x39, 0x71, 0xe2, 0xd5, 0xb6, 0x9b, 0xae, 0xcf, 0x11, 0x84, 0x2f, 0x5e, 0x03, + 0xf4, 0x71, 0xe4, 0xb1, 0xfd, 0xb4, 0xb1, 0x67, 0xfb, 0x4d, 0x52, 0xb3, 0x43, 0xc2, 0xd0, 0x18, + 0x5c, 0x70, 0x88, 0x4f, 0x5b, 0xe3, 0xc6, 0xb4, 0x31, 0x3b, 0x54, 0x13, 0x3f, 0xde, 0xfd, 0xce, + 0xaf, 0x9f, 0x4f, 0x0d, 0xfc, 0xf7, 0xf9, 0xd4, 0x00, 0xfe, 0xbd, 0x01, 0x66, 0x7e, 0x5a, 0x8d, + 0xb0, 0x36, 0xf5, 0x19, 0x41, 0x4f, 0x61, 0x84, 0x48, 0x43, 0x3d, 0x88, 0x2c, 0xe3, 0xc6, 0xf4, + 0xb9, 0xd9, 0xd2, 0xca, 0x64, 0x55, 0x90, 0x55, 0x23, 0xb2, 0xaa, 0x64, 0xaa, 0x6e, 0x91, 0xc6, + 0x26, 0x75, 0xfd, 0x8d, 0xd5, 0x17, 0x7f, 0x9f, 0x1a, 0xf8, 0xf3, 0x3f, 0xa6, 0xe6, 0x9b, 0x6e, + 0xb8, 0x77, 0xb0, 0x5b, 0x6d, 0xd0, 0x96, 0x25, 0x57, 0x22, 0xfe, 0xb3, 0xc8, 0x9c, 0x4f, 0xad, + 0xf0, 0xa8, 0x4d, 0x58, 0x3c, 0x87, 0xd5, 0xca, 0x44, 0x25, 0xc0, 0x26, 0x8c, 0x73, 0xae, 0xf5, + 0x46, 0xe8, 0x76, 0x48, 0x8a, 0x0e, 0x6f, 0xc3, 0x74, 0x91, 0x2d, 0x21, 0xbf, 0x09, 0xc3, 0x36, + 0x37, 0x2b, 0xdc, 0x43, 0xb5, 0x92, 0x18, 0x13, 0x61, 0x3e, 0x84, 0xab, 0x3c, 0xcc, 0xfb, 0x84, + 0x38, 0x24, 0xd8, 0x22, 0x1e, 0x69, 0xf2, 0x82, 0xa2, 0x3b, 0x30, 0xd2, 0xb1, 0x3d, 0xd7, 0xb1, + 0x43, 0x1a, 0xd4, 0x6d, 0xc7, 0x09, 0x64, 0xf5, 0xca, 0xc9, 0xe8, 0xba, 0xe3, 0x04, 0x4a, 0x15, + 0x7f, 0x04, 0x37, 0xb4, 0x91, 0x12, 0x9a, 0x29, 0x28, 0x3d, 0xe1, 0x36, 0x35, 0x1c, 0x88, 0xa1, + 0x28, 0x16, 0xde, 0x84, 0x51, 0x1e, 0xe1, 0xa7, 0x2e, 0x63, 0x9b, 0xf4, 0xc0, 0x0f, 0x49, 0x70, + 0x76, 0x8c, 0xf7, 0x64, 0xcd, 0x94, 0x20, 0x6a, 0x3d, 0x5a, 0x2e, 0x63, 0xf5, 0x86, 0x18, 0xe7, + 0xa1, 0xce, 0xd7, 0x4a, 0xad, 0xae, 0x2b, 0x46, 0x92, 0xe1, 0xa1, 0x67, 0xb3, 0xbd, 0xc7, 0xae, + 0xef, 0xd0, 0x43, 0xbc, 0x29, 0x43, 0x2a, 0x63, 0x49, 0xc8, 0x19, 0xb8, 0x74, 0xc8, 0x47, 0xea, + 0xed, 0x80, 0x36, 0x03, 0xc2, 0x98, 0x8c, 0x3a, 0x22, 0x86, 0x77, 0xe4, 0x68, 0x52, 0xe8, 0xf5, + 0x66, 0x33, 0x88, 0x2a, 0x43, 0x76, 0x02, 0xd2, 0xa1, 0x21, 0x39, 0xfb, 0x0a, 0x7f, 0x25, 0x0b, + 0x9d, 0x8d, 0x94, 0x30, 0xfd, 0x1c, 0x2e, 0xdb, 0xb1, 0xad, 0xde, 0x16, 0x46, 0x1e, 0xb4, 0xb4, + 0x32, 0x5f, 0x4d, 0x1d, 0xf3, 0x6a, 0x12, 0x43, 0xdd, 0x40, 0x32, 0xde, 0xc6, 0xf9, 0x68, 0x0b, + 0xd7, 0x46, 0xed, 0x4c, 0x1e, 0x3c, 0x0e, 0x6f, 0x6b, 0x01, 0x18, 0xfe, 0xc2, 0x80, 0x8a, 0xde, + 0x94, 0xc0, 0xfd, 0x02, 0x50, 0x0e, 0x2e, 0x3e, 0x51, 0x6f, 0x40, 0x77, 0xd9, 0xce, 0x41, 0x6c, + 0xcb, 0x4b, 0x20, 0x99, 0xfd, 0xe8, 0x8d, 0xca, 0xcc, 0xe4, 0xa5, 0x90, 0x0a, 0x93, 0x2c, 0xe3, + 0x67, 0x30, 0xd2, 0x5d, 0x86, 0x52, 0xe0, 0xd9, 0x7e, 0x96, 0xf0, 0xa8, 0xcb, 0x5f, 0xb6, 0xd5, + 0xf0, 0xf8, 0x2a, 0x5c, 0xc9, 0x27, 0x65, 0xb8, 0x03, 0xd7, 0x35, 0xc3, 0x09, 0xcc, 0x63, 0xb8, + 0x94, 0x86, 0x89, 0x0b, 0x7a, 0x56, 0x9a, 0x11, 0x3b, 0x9d, 0xb7, 0x0c, 0x25, 0x9e, 0x77, 0xc7, + 0x0e, 0xec, 0x16, 0xc3, 0x3f, 0x96, 0x74, 0xe2, 0x67, 0x92, 0x7e, 0x15, 0x06, 0xdb, 0x7c, 0x44, + 0xd6, 0xe0, 0x6a, 0x26, 0xab, 0x70, 0x97, 0x29, 0xa4, 0x2b, 0xfe, 0x08, 0x86, 0xc5, 0x39, 0x25, + 0x8e, 0x6b, 0xfb, 0x05, 0x97, 0x34, 0x9a, 0x84, 0x21, 0xff, 0xa0, 0xf5, 0x30, 0xb4, 0x5b, 0x6d, + 0x36, 0xfe, 0xd6, 0xb4, 0x31, 0x5b, 0xae, 0x75, 0x07, 0x94, 0x8f, 0xf5, 0x31, 0x8c, 0xa9, 0xd1, + 0x12, 0xb4, 0xfb, 0x70, 0xb1, 0x25, 0x86, 0x64, 0x45, 0x26, 0xb2, 0x6c, 0x81, 0xdb, 0x20, 0x3c, + 0x9c, 0xe4, 0x8b, 0xfd, 0xf1, 0x3b, 0xf2, 0xc0, 0x8a, 0x90, 0x5b, 0xa4, 0xe3, 0x8a, 0xc7, 0xae, + 0xe7, 0x73, 0xe2, 0xc9, 0xf3, 0x99, 0x9d, 0x98, 0x40, 0xfd, 0x04, 0x46, 0x5b, 0x19, 0x5b, 0xbf, + 0x74, 0xb9, 0x89, 0x78, 0x02, 0xae, 0xf1, 0x6c, 0x8f, 0xe2, 0x6d, 0x5c, 0x23, 0x87, 0x76, 0xe0, + 0x3c, 0x24, 0x21, 0xde, 0x87, 0xa9, 0x02, 0x53, 0x82, 0xf2, 0x01, 0x40, 0xb2, 0xff, 0xe3, 0xcf, + 0x77, 0x33, 0x03, 0x91, 0x9f, 0x2e, 0x61, 0x94, 0xa9, 0xf8, 0x73, 0x79, 0x47, 0x7e, 0x14, 0xbd, + 0x2a, 0x21, 0xe7, 0x66, 0x35, 0xf2, 0xd9, 0x01, 0x61, 0x21, 0x7a, 0x1b, 0x06, 0x79, 0x8d, 0xe2, + 0x07, 0x48, 0xfe, 0x42, 0xef, 0x03, 0x74, 0x5f, 0x70, 0xfe, 0x75, 0x4b, 0x2b, 0x77, 0x53, 0x8f, + 0xaa, 0x68, 0x50, 0xe2, 0xa7, 0x75, 0xc7, 0x6e, 0x12, 0x19, 0xb3, 0xa6, 0xcc, 0xc4, 0x7f, 0x30, + 0x60, 0x42, 0x93, 0x5c, 0x2e, 0x71, 0x05, 0x06, 0xdb, 0x7c, 0x44, 0xd6, 0xd8, 0xcc, 0x2c, 0x4f, + 0x99, 0x54, 0x93, 0x9e, 0x51, 0x59, 0x72, 0x64, 0x33, 0x3d, 0xc9, 0x44, 0xc2, 0x14, 0xda, 0x8d, + 0xf8, 0xe0, 0x7a, 0x9e, 0xa6, 0x32, 0xf8, 0x2b, 0x03, 0x26, 0xf5, 0xf6, 0x6f, 0x03, 0xfc, 0x92, + 0xfc, 0xa6, 0x3c, 0xfc, 0x87, 0x2e, 0x0b, 0x69, 0x70, 0x14, 0x7f, 0xd3, 0x31, 0xb8, 0x60, 0x33, + 0x46, 0xc2, 0xf8, 0x10, 0xf0, 0x1f, 0xf8, 0x77, 0xf1, 0x97, 0x48, 0x4f, 0x91, 0x8b, 0x59, 0xc8, + 0x2c, 0x66, 0x4c, 0xb7, 0xdb, 0xff, 0xff, 0xcb, 0x98, 0x97, 0x4f, 0xfa, 0x0e, 0xa5, 0x5e, 0x8c, + 0x7f, 0x0d, 0x2e, 0xb6, 0x29, 0xf5, 0xea, 0xae, 0x23, 0x9f, 0xeb, 0xc1, 0xe8, 0xe7, 0x03, 0x07, + 0x6f, 0xc0, 0x65, 0xc5, 0x59, 0x82, 0x2f, 0xc2, 0xf9, 0xc8, 0x2c, 0xcf, 0xc7, 0x95, 0x2c, 0x36, + 0xa5, 0x9e, 0x3c, 0x11, 0xdc, 0x2d, 0xb9, 0xc4, 0x23, 0xc3, 0xba, 0x17, 0xe7, 0xc4, 0xdb, 0xf2, + 0x8e, 0x4a, 0x86, 0x73, 0xd1, 0xcf, 0xf5, 0x13, 0x7d, 0x4d, 0x96, 0x78, 0xbd, 0x21, 0xda, 0x18, + 0xa7, 0xaf, 0x75, 0x35, 0xe3, 0xd7, 0x2c, 0x3d, 0x4b, 0x22, 0x3c, 0x80, 0x11, 0x3b, 0x36, 0xd4, + 0x95, 0xa5, 0x4e, 0x66, 0xdf, 0x0f, 0x75, 0x76, 0xf2, 0x82, 0xa9, 0x83, 0xb8, 0x12, 0xef, 0x68, + 0x75, 0x54, 0xa9, 0xc2, 0x7e, 0xdc, 0xbd, 0xe4, 0xec, 0xa7, 0xb0, 0x9c, 0x7b, 0x33, 0x96, 0xc5, + 0xb8, 0xe7, 0x8a, 0x36, 0xe7, 0x03, 0xff, 0x09, 0x55, 0x76, 0x6f, 0xfe, 0x0a, 0xc7, 0x8f, 0xe3, + 0xbe, 0xa6, 0xeb, 0x2e, 0x99, 0xde, 0x03, 0xe0, 0x1b, 0xbc, 0xee, 0xfa, 0x4f, 0xa8, 0xac, 0xcd, + 0x78, 0x96, 0x27, 0x9e, 0x25, 0x59, 0x86, 0xec, 0x78, 0xa0, 0xdb, 0xc7, 0xc7, 0x23, 0x4a, 0x3d, + 0x3e, 0x89, 0x3f, 0x67, 0xca, 0x56, 0x90, 0xf7, 0xdc, 0x99, 0xf2, 0xae, 0xfc, 0x67, 0x02, 0x2e, + 0xf0, 0xe0, 0xe8, 0x99, 0x01, 0xe5, 0xb4, 0x28, 0xca, 0xde, 0xf2, 0x79, 0x01, 0x64, 0xce, 0xf5, + 0x74, 0x89, 0x41, 0xf1, 0xda, 0x17, 0x7f, 0xfd, 0xf7, 0xb3, 0xb7, 0xaa, 0x68, 0xc1, 0x4a, 0xeb, + 0x3c, 0x71, 0xd3, 0x5b, 0x69, 0xfd, 0x64, 0x1d, 0xf3, 0xe1, 0x13, 0xf4, 0x8d, 0x01, 0x57, 0x34, + 0xfa, 0x05, 0xcd, 0xe8, 0x12, 0x6b, 0x1c, 0x4d, 0xab, 0x4f, 0xc7, 0x84, 0x73, 0x95, 0x73, 0x2e, + 0xa2, 0x79, 0x3d, 0xa7, 0x54, 0x4b, 0x69, 0x5c, 0xf4, 0x27, 0x03, 0x46, 0x73, 0xfa, 0xe8, 0xb6, + 0x2e, 0x75, 0xd6, 0xcb, 0x5c, 0xe8, 0xc7, 0x2b, 0xa1, 0xbb, 0xcf, 0xe9, 0x56, 0xd1, 0x72, 0x86, + 0xae, 0xfb, 0xce, 0x5a, 0xc7, 0xe9, 0x26, 0xf6, 0xc4, 0x12, 0xfa, 0x09, 0x7d, 0x69, 0x40, 0x49, + 0xd5, 0x4d, 0x53, 0xba, 0xc4, 0x8a, 0x83, 0x39, 0xd3, 0xc3, 0x21, 0x81, 0x7a, 0x87, 0x43, 0x2d, + 0x23, 0xeb, 0x0c, 0x50, 0x91, 0xa2, 0x42, 0xbf, 0x84, 0x92, 0xa2, 0x98, 0xf4, 0x44, 0x8a, 0x83, + 0x9e, 0x48, 0xa3, 0xb9, 0xf0, 0x2d, 0x4e, 0x74, 0x03, 0x5d, 0xcf, 0x10, 0xb1, 0xc8, 0xb7, 0x2e, + 0x74, 0x17, 0xfa, 0x8b, 0x01, 0xa3, 0x39, 0xad, 0xa5, 0xfd, 0x68, 0x59, 0x2f, 0xfd, 0x47, 0x2b, + 0x52, 0x5b, 0x78, 0x8b, 0xd3, 0xfc, 0x10, 0xfd, 0xe0, 0x0c, 0xf5, 0xc9, 0x29, 0x20, 0xf4, 0xb5, + 0x01, 0x97, 0x73, 0xa2, 0x09, 0xdd, 0xe9, 0x87, 0x84, 0x99, 0x8b, 0x7d, 0xb9, 0xf5, 0x3c, 0xac, + 0x0a, 0x71, 0x5e, 0xa2, 0xa1, 0xe7, 0x06, 0x94, 0xd3, 0x92, 0xea, 0xe6, 0xa9, 0x69, 0x23, 0x17, + 0xfd, 0x15, 0xa2, 0x55, 0x54, 0x78, 0x9d, 0x53, 0x7d, 0x1f, 0xdd, 0xcf, 0x53, 0x39, 0x6e, 0xcf, + 0x3a, 0xf2, 0x22, 0x3e, 0x33, 0x60, 0x24, 0x2d, 0x91, 0x10, 0xee, 0x09, 0xc0, 0xcc, 0x7b, 0xbd, + 0x7d, 0x12, 0xca, 0x65, 0x4e, 0x39, 0x8f, 0xe6, 0xfa, 0xa9, 0x9d, 0x28, 0x5c, 0x13, 0x06, 0x85, + 0x02, 0x42, 0xa6, 0x2e, 0x91, 0xb0, 0x99, 0xb8, 0xd8, 0x96, 0x24, 0xbf, 0xc1, 0x93, 0x5f, 0x43, + 0x57, 0x33, 0xc9, 0x85, 0xa4, 0x42, 0x1d, 0xb8, 0x18, 0xab, 0xa9, 0xeb, 0xda, 0xd3, 0x2d, 0x8c, + 0xe6, 0xad, 0x53, 0x8c, 0x49, 0xae, 0x39, 0x9e, 0xeb, 0x16, 0xba, 0xc9, 0x73, 0xed, 0xf1, 0x56, + 0x2e, 0x73, 0x5b, 0x4a, 0xa5, 0x84, 0xbe, 0x32, 0x60, 0x34, 0xa7, 0x92, 0x6e, 0x17, 0x27, 0xe9, + 0x7a, 0xe9, 0x8f, 0x5a, 0x91, 0x70, 0xca, 0xdc, 0xde, 0xa7, 0x30, 0xd5, 0x9d, 0x2e, 0xc8, 0x37, + 0x06, 0xa0, 0xbc, 0x84, 0x41, 0x77, 0x75, 0x99, 0xf3, 0x7e, 0x66, 0xb5, 0x3f, 0xbf, 0x84, 0xf1, + 0xbb, 0x9c, 0x71, 0x09, 0x55, 0x8b, 0xb7, 0x71, 0x77, 0x17, 0x07, 0x7c, 0x7a, 0x9d, 0x91, 0x30, + 0x2a, 0xe2, 0xb0, 0x2a, 0x01, 0xf4, 0x8f, 0xa0, 0x46, 0x44, 0x98, 0xb3, 0xbd, 0x1d, 0x25, 0xdb, + 0xf7, 0x38, 0xdb, 0x0a, 0x5a, 0xe2, 0xff, 0xfe, 0xba, 0xe8, 0x93, 0xf0, 0x90, 0x06, 0x9f, 0xf2, + 0x1f, 0x31, 0xa9, 0xc7, 0xe7, 0xd5, 0x45, 0x0f, 0x2e, 0x1f, 0x6a, 0x76, 0x12, 0x5d, 0x4f, 0x97, + 0x32, 0x1a, 0x05, 0xe9, 0x8f, 0x8d, 0x56, 0xe8, 0x98, 0xf3, 0x7d, 0xf9, 0xe6, 0x3e, 0x73, 0x21, + 0xa6, 0xed, 0x79, 0xf5, 0x14, 0x2a, 0xfa, 0xa3, 0x01, 0xc3, 0xaa, 0xea, 0xd0, 0xd7, 0x4f, 0x23, + 0x65, 0xf4, 0xf5, 0xd3, 0x09, 0x18, 0xe5, 0x29, 0x2c, 0x04, 0xe3, 0x34, 0x75, 0xb1, 0x35, 0x8f, + 0xac, 0x63, 0xde, 0x8b, 0x9d, 0xa0, 0x63, 0x38, 0x1f, 0x35, 0xa4, 0xfa, 0x37, 0x50, 0xe9, 0xdf, + 0xcd, 0xe9, 0x62, 0x07, 0xc9, 0xb0, 0xc4, 0x19, 0xee, 0xa1, 0xd9, 0x53, 0x18, 0x28, 0xf5, 0xac, + 0x63, 0xa9, 0x03, 0x4e, 0xd0, 0xe7, 0x70, 0x51, 0xf6, 0xd8, 0xfa, 0xdb, 0x30, 0xdd, 0xa0, 0xeb, + 0x6f, 0x87, 0x4c, 0x93, 0x8e, 0xef, 0x72, 0x8a, 0x69, 0x54, 0x39, 0x9d, 0x42, 0x3c, 0x1a, 0x6a, + 0x4f, 0x8e, 0x66, 0xf5, 0x2d, 0x5b, 0x5e, 0xcb, 0x14, 0xbc, 0x1d, 0x3a, 0xfd, 0x82, 0xdf, 0xe5, + 0x38, 0x6b, 0x68, 0xe5, 0x94, 0x1d, 0x93, 0xd2, 0x14, 0x4a, 0x79, 0xbe, 0x8e, 0x1a, 0x85, 0x8c, + 0x18, 0x41, 0xf3, 0x3d, 0x73, 0x2b, 0x15, 0x5b, 0xe8, 0xcf, 0xb9, 0xff, 0x0f, 0x98, 0x66, 0x45, + 0xbf, 0x31, 0x60, 0x28, 0xe9, 0xf2, 0x0b, 0x7a, 0x98, 0x8c, 0xc2, 0x31, 0xef, 0xf4, 0xf0, 0xca, + 0xb5, 0x02, 0xc5, 0x30, 0x89, 0x00, 0x49, 0xfa, 0xf6, 0xdf, 0x1a, 0x30, 0xac, 0xea, 0x95, 0x82, + 0x86, 0x3d, 0xaf, 0x76, 0xf4, 0x67, 0x4d, 0x27, 0x7d, 0xf0, 0x02, 0x27, 0xbb, 0x8b, 0x6e, 0xf7, + 0x43, 0xb6, 0xf1, 0xc1, 0x8b, 0x7f, 0x55, 0x06, 0x5e, 0xbc, 0xaa, 0x18, 0x2f, 0x5f, 0x55, 0x8c, + 0x7f, 0xbe, 0xaa, 0x18, 0x5f, 0xbe, 0xae, 0x0c, 0xbc, 0x7c, 0x5d, 0x19, 0xf8, 0xdb, 0xeb, 0xca, + 0xc0, 0x27, 0x73, 0xca, 0xdf, 0x60, 0xe8, 0x3e, 0x4d, 0x82, 0x45, 0x37, 0xf4, 0xd3, 0x38, 0x1a, + 0xff, 0x53, 0xcc, 0xee, 0x20, 0xff, 0x43, 0xd2, 0xea, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x80, + 0xdc, 0xa0, 0xbc, 0x2a, 0x1b, 0x00, 0x00, } -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 +// 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) + LatestPrices(ctx context.Context, in *QueryLatestPricesRequest, opts ...grpc.CallOption) (*QueryLatestPricesResponse, error) + AllLatestPrices(ctx context.Context, in *QueryAllLatestPricesRequest, opts ...grpc.CallOption) (*QueryAllLatestPricesResponse, error) + PriceHistory(ctx context.Context, in *QueryPriceHistoryRequest, opts ...grpc.CallOption) (*QueryPriceHistoryResponse, error) + // Queries a Pool. + Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) + // Queries a list of Pool items. + PoolAll(ctx context.Context, in *QueryPoolAllRequest, opts ...grpc.CallOption) (*QueryPoolAllResponse, error) + // Queries an AccountedPool. + AccountedPool(ctx context.Context, in *QueryAccountedPoolRequest, opts ...grpc.CallOption) (*QueryAccountedPoolResponse, error) + // Queries a list of AccountedPool items. + AccountedPoolAll(ctx context.Context, in *QueryAccountedPoolAllRequest, opts ...grpc.CallOption) (*QueryAccountedPoolAllResponse, error) + // Queries a AssetInfo by denom. + AssetInfo(ctx context.Context, in *QueryAssetInfoRequest, opts ...grpc.CallOption) (*QueryAssetInfoResponse, error) + // Queries a list of AssetInfo items. + AssetInfoAll(ctx context.Context, in *QueryAssetInfoAllRequest, opts ...grpc.CallOption) (*QueryAssetInfoAllResponse, error) } -func (m *QueryActiveExchangeRates) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type queryClient struct { + cc grpc1.ClientConn } -func (m *QueryActiveExchangeRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} } -func (m *QueryActiveExchangeRatesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) ExchangeRates(ctx context.Context, in *QueryExchangeRates, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) { + out := new(QueryExchangeRatesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/ExchangeRates", in, out, opts...) 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]) + return out, nil } -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 - } +func (c *queryClient) ActiveExchangeRates(ctx context.Context, in *QueryActiveExchangeRates, opts ...grpc.CallOption) (*QueryActiveExchangeRatesResponse, error) { + out := new(QueryActiveExchangeRatesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/ActiveExchangeRates", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryFeederDelegation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) FeederDelegation(ctx context.Context, in *QueryFeederDelegation, opts ...grpc.CallOption) (*QueryFeederDelegationResponse, error) { + out := new(QueryFeederDelegationResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/FeederDelegation", in, out, opts...) 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]) + return out, nil } -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 +func (c *queryClient) MissCounter(ctx context.Context, in *QueryMissCounter, opts ...grpc.CallOption) (*QueryMissCounterResponse, error) { + out := new(QueryMissCounterResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/MissCounter", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryFeederDelegationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) SlashWindow(ctx context.Context, in *QuerySlashWindow, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) { + out := new(QuerySlashWindowResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/SlashWindow", in, out, opts...) 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]) + return out, nil } -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 +func (c *queryClient) AggregatePrevote(ctx context.Context, in *QueryAggregatePrevote, opts ...grpc.CallOption) (*QueryAggregatePrevoteResponse, error) { + out := new(QueryAggregatePrevoteResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregatePrevote", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryMissCounter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) AggregatePrevotes(ctx context.Context, in *QueryAggregatePrevotes, opts ...grpc.CallOption) (*QueryAggregatePrevotesResponse, error) { + out := new(QueryAggregatePrevotesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregatePrevotes", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, 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]) +func (c *queryClient) AggregateVote(ctx context.Context, in *QueryAggregateVote, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) { + out := new(QueryAggregateVoteResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregateVote", in, out, opts...) 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]) + return out, nil } -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 +func (c *queryClient) AggregateVotes(ctx context.Context, in *QueryAggregateVotes, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) { + out := new(QueryAggregateVotesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AggregateVotes", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QuerySlashWindow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/Params", in, out, opts...) 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 + return out, nil } -func (m *QuerySlashWindowResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Medians(ctx context.Context, in *QueryMedians, opts ...grpc.CallOption) (*QueryMediansResponse, error) { + out := new(QueryMediansResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/Medians", in, out, opts...) 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]) + return out, nil } -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 +func (c *queryClient) MedianDeviations(ctx context.Context, in *QueryMedianDeviations, opts ...grpc.CallOption) (*QueryMedianDeviationsResponse, error) { + out := new(QueryMedianDeviationsResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/MedianDeviations", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryAggregatePrevote) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) { + out := new(QueryValidatorRewardSetResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/ValidatorRewardSet", in, out, opts...) 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]) + return out, nil } -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 +func (c *queryClient) LatestPrices(ctx context.Context, in *QueryLatestPricesRequest, opts ...grpc.CallOption) (*QueryLatestPricesResponse, error) { + out := new(QueryLatestPricesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/LatestPrices", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryAggregatePrevoteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) AllLatestPrices(ctx context.Context, in *QueryAllLatestPricesRequest, opts ...grpc.CallOption) (*QueryAllLatestPricesResponse, error) { + out := new(QueryAllLatestPricesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AllLatestPrices", in, out, opts...) 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]) + return out, nil } -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)) +func (c *queryClient) PriceHistory(ctx context.Context, in *QueryPriceHistoryRequest, opts ...grpc.CallOption) (*QueryPriceHistoryResponse, error) { + out := new(QueryPriceHistoryResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/PriceHistory", in, out, opts...) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return out, nil } -func (m *QueryAggregatePrevotes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { + out := new(QueryPoolResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/Pool", in, out, opts...) 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 + return out, nil } -func (m *QueryAggregatePrevotesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) PoolAll(ctx context.Context, in *QueryPoolAllRequest, opts ...grpc.CallOption) (*QueryPoolAllResponse, error) { + out := new(QueryPoolAllResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/PoolAll", in, out, opts...) 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]) + return out, nil } -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 - } +func (c *queryClient) AccountedPool(ctx context.Context, in *QueryAccountedPoolRequest, opts ...grpc.CallOption) (*QueryAccountedPoolResponse, error) { + out := new(QueryAccountedPoolResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AccountedPool", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryAggregateVote) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) AccountedPoolAll(ctx context.Context, in *QueryAccountedPoolAllRequest, opts ...grpc.CallOption) (*QueryAccountedPoolAllResponse, error) { + out := new(QueryAccountedPoolAllResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AccountedPoolAll", in, out, opts...) 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]) + return out, nil } -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 +func (c *queryClient) AssetInfo(ctx context.Context, in *QueryAssetInfoRequest, opts ...grpc.CallOption) (*QueryAssetInfoResponse, error) { + out := new(QueryAssetInfoResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AssetInfo", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryAggregateVoteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) AssetInfoAll(ctx context.Context, in *QueryAssetInfoAllRequest, opts ...grpc.CallOption) (*QueryAssetInfoAllResponse, error) { + out := new(QueryAssetInfoAllResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/AssetInfoAll", in, out, opts...) 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]) + return out, nil } -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 +// 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) + LatestPrices(context.Context, *QueryLatestPricesRequest) (*QueryLatestPricesResponse, error) + AllLatestPrices(context.Context, *QueryAllLatestPricesRequest) (*QueryAllLatestPricesResponse, error) + PriceHistory(context.Context, *QueryPriceHistoryRequest) (*QueryPriceHistoryResponse, error) + // Queries a Pool. + Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) + // Queries a list of Pool items. + PoolAll(context.Context, *QueryPoolAllRequest) (*QueryPoolAllResponse, error) + // Queries an AccountedPool. + AccountedPool(context.Context, *QueryAccountedPoolRequest) (*QueryAccountedPoolResponse, error) + // Queries a list of AccountedPool items. + AccountedPoolAll(context.Context, *QueryAccountedPoolAllRequest) (*QueryAccountedPoolAllResponse, error) + // Queries a AssetInfo by denom. + AssetInfo(context.Context, *QueryAssetInfoRequest) (*QueryAssetInfoResponse, error) + // Queries a list of AssetInfo items. + AssetInfoAll(context.Context, *QueryAssetInfoAllRequest) (*QueryAssetInfoAllResponse, error) } -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 +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { } -func (m *QueryAggregateVotes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) ExchangeRates(ctx context.Context, req *QueryExchangeRates) (*QueryExchangeRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExchangeRates not implemented") } - -func (m *QueryAggregateVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (*UnimplementedQueryServer) ActiveExchangeRates(ctx context.Context, req *QueryActiveExchangeRates) (*QueryActiveExchangeRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActiveExchangeRates not implemented") } - -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 (*UnimplementedQueryServer) FeederDelegation(ctx context.Context, req *QueryFeederDelegation) (*QueryFeederDelegationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeederDelegation not implemented") } - -func (m *QueryAggregateVotesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) MissCounter(ctx context.Context, req *QueryMissCounter) (*QueryMissCounterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MissCounter not implemented") } - -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 (*UnimplementedQueryServer) SlashWindow(ctx context.Context, req *QuerySlashWindow) (*QuerySlashWindowResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SlashWindow not implemented") } - -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 (*UnimplementedQueryServer) AggregatePrevote(ctx context.Context, req *QueryAggregatePrevote) (*QueryAggregatePrevoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevote not implemented") } - -func (m *QueryParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) AggregatePrevotes(ctx context.Context, req *QueryAggregatePrevotes) (*QueryAggregatePrevotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevotes not implemented") } - -func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (*UnimplementedQueryServer) AggregateVote(ctx context.Context, req *QueryAggregateVote) (*QueryAggregateVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVote not implemented") } - -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 (*UnimplementedQueryServer) AggregateVotes(ctx context.Context, req *QueryAggregateVotes) (*QueryAggregateVotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVotes not implemented") } - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } - -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 (*UnimplementedQueryServer) Medians(ctx context.Context, req *QueryMedians) (*QueryMediansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Medians not implemented") } - -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 (*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) LatestPrices(ctx context.Context, req *QueryLatestPricesRequest) (*QueryLatestPricesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LatestPrices not implemented") +} +func (*UnimplementedQueryServer) AllLatestPrices(ctx context.Context, req *QueryAllLatestPricesRequest) (*QueryAllLatestPricesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllLatestPrices not implemented") +} +func (*UnimplementedQueryServer) PriceHistory(ctx context.Context, req *QueryPriceHistoryRequest) (*QueryPriceHistoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PriceHistory not implemented") +} +func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") +} +func (*UnimplementedQueryServer) PoolAll(ctx context.Context, req *QueryPoolAllRequest) (*QueryPoolAllResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PoolAll not implemented") +} +func (*UnimplementedQueryServer) AccountedPool(ctx context.Context, req *QueryAccountedPoolRequest) (*QueryAccountedPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountedPool not implemented") +} +func (*UnimplementedQueryServer) AccountedPoolAll(ctx context.Context, req *QueryAccountedPoolAllRequest) (*QueryAccountedPoolAllResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountedPoolAll not implemented") +} +func (*UnimplementedQueryServer) AssetInfo(ctx context.Context, req *QueryAssetInfoRequest) (*QueryAssetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssetInfo not implemented") +} +func (*UnimplementedQueryServer) AssetInfoAll(ctx context.Context, req *QueryAssetInfoAllRequest) (*QueryAssetInfoAllResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssetInfoAll not implemented") } -func (m *QueryMedians) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) } -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 +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 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 + if interceptor == nil { + return srv.(QueryServer).ExchangeRates(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (m *QueryMediansResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - return dAtA[:n], nil -} - -func (m *QueryMediansResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).ActiveExchangeRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (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 - } +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 } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).FeederDelegation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (m *QueryMedianDeviations) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - 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 + if interceptor == nil { + return srv.(QueryServer).MissCounter(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (m *QueryMedianDeviationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - 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 - } + if interceptor == nil { + return srv.(QueryServer).SlashWindow(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (m *QueryValidatorRewardSet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - 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 + if interceptor == nil { + return srv.(QueryServer).AggregatePrevote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (m *QueryValidatorRewardSetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - 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)) + if interceptor == nil { + return srv.(QueryServer).AggregatePrevotes(ctx, in) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 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++ +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 } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryExchangeRates) Size() (n int) { - if m == nil { - return 0 + if interceptor == nil { + return srv.(QueryServer).AggregateVote(ctx, in) } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AggregateVote", } - return n + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVote(ctx, req.(*QueryAggregateVote)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryExchangeRatesResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - if len(m.ExchangeRates) > 0 { - for _, e := range m.ExchangeRates { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if interceptor == nil { + return srv.(QueryServer).AggregateVotes(ctx, in) } - return n -} - -func (m *QueryActiveExchangeRates) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AggregateVotes", } - var l int - _ = l - return n + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVotes(ctx, req.(*QueryAggregateVotes)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryActiveExchangeRatesResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - if len(m.ActiveRates) > 0 { - for _, s := range m.ActiveRates { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) } - return n -} - -func (m *QueryFeederDelegation) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/Params", } - var l int - _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParams)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *QueryFeederDelegationResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - l = len(m.FeederAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if interceptor == nil { + return srv.(QueryServer).Medians(ctx, in) } - return n -} - -func (m *QueryMissCounter) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/Medians", } - var l int - _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Medians(ctx, req.(*QueryMedians)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *QueryMissCounterResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - if m.MissCounter != 0 { - n += 1 + sovQuery(uint64(m.MissCounter)) + if interceptor == nil { + return srv.(QueryServer).MedianDeviations(ctx, in) } - return n -} - -func (m *QuerySlashWindow) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/MedianDeviations", } - var l int - _ = l - return n + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MedianDeviations(ctx, req.(*QueryMedianDeviations)) + } + return interceptor(ctx, in, info, handler) } -func (m *QuerySlashWindowResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - if m.WindowProgress != 0 { - n += 1 + sovQuery(uint64(m.WindowProgress)) + if interceptor == nil { + return srv.(QueryServer).ValidatorRewardSet(ctx, in) } - return n -} - -func (m *QueryAggregatePrevote) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/ValidatorRewardSet", } - var l int - _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorRewardSet(ctx, req.(*QueryValidatorRewardSet)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *QueryAggregatePrevoteResponse) Size() (n int) { - if m == nil { - return 0 +func _Query_LatestPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLatestPricesRequest) + if err := dec(in); err != nil { + return nil, err } - 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 + if interceptor == nil { + return srv.(QueryServer).LatestPrices(ctx, in) } - var l int - _ = l - return n -} - -func (m *QueryAggregatePrevotesResponse) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/LatestPrices", } - var l int - _ = l - if len(m.AggregatePrevotes) > 0 { - for _, e := range m.AggregatePrevotes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LatestPrices(ctx, req.(*QueryLatestPricesRequest)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *QueryAggregateVote) Size() (n int) { - if m == nil { - return 0 +func _Query_AllLatestPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllLatestPricesRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if interceptor == nil { + return srv.(QueryServer).AllLatestPrices(ctx, in) } - return n -} - -func (m *QueryAggregateVoteResponse) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AllLatestPrices", } - 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 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllLatestPrices(ctx, req.(*QueryAllLatestPricesRequest)) } - var l int - _ = l - return n + return interceptor(ctx, in, info, handler) } -func (m *QueryAggregateVotesResponse) Size() (n int) { - if m == nil { - return 0 +func _Query_PriceHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPriceHistoryRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - if len(m.AggregateVotes) > 0 { - for _, e := range m.AggregateVotes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if interceptor == nil { + return srv.(QueryServer).PriceHistory(ctx, in) } - return n -} - -func (m *QueryParams) Size() (n int) { - if m == nil { - return 0 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/PriceHistory", } - var l int - _ = l - return n + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PriceHistory(ctx, req.(*QueryPriceHistoryRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 +func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + if interceptor == nil { + return srv.(QueryServer).Pool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/Pool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryMedians) Size() (n int) { - if m == nil { - return 0 +func _Query_PoolAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolAllRequest) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if interceptor == nil { + return srv.(QueryServer).PoolAll(ctx, in) } - if m.NumStamps != 0 { - n += 1 + sovQuery(uint64(m.NumStamps)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/PoolAll", } - return n + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PoolAll(ctx, req.(*QueryPoolAllRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryMediansResponse) Size() (n int) { - if m == nil { - return 0 +func _Query_AccountedPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountedPoolRequest) + if err := dec(in); err != nil { + return nil, err } + if interceptor == nil { + return srv.(QueryServer).AccountedPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AccountedPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountedPool(ctx, req.(*QueryAccountedPoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AccountedPoolAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountedPoolAllRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountedPoolAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AccountedPoolAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountedPoolAll(ctx, req.(*QueryAccountedPoolAllRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AssetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAssetInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AssetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AssetInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AssetInfo(ctx, req.(*QueryAssetInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AssetInfoAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAssetInfoAllRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AssetInfoAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/AssetInfoAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AssetInfoAll(ctx, req.(*QueryAssetInfoAllRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ojo.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: "LatestPrices", + Handler: _Query_LatestPrices_Handler, + }, + { + MethodName: "AllLatestPrices", + Handler: _Query_AllLatestPrices_Handler, + }, + { + MethodName: "PriceHistory", + Handler: _Query_PriceHistory_Handler, + }, + { + MethodName: "Pool", + Handler: _Query_Pool_Handler, + }, + { + MethodName: "PoolAll", + Handler: _Query_PoolAll_Handler, + }, + { + MethodName: "AccountedPool", + Handler: _Query_AccountedPool_Handler, + }, + { + MethodName: "AccountedPoolAll", + Handler: _Query_AccountedPoolAll_Handler, + }, + { + MethodName: "AssetInfo", + Handler: _Query_AssetInfo_Handler, + }, + { + MethodName: "AssetInfoAll", + Handler: _Query_AssetInfoAll_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ojo/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.Medians) > 0 { - for _, e := range m.Medians { - l = e.Size() - n += 1 + l + sovQuery(uint64(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 n + return len(dAtA) - i, nil } -func (m *QueryMedianDeviations) Size() (n int) { - if m == nil { - return 0 +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 - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(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 n + return len(dAtA) - i, nil } -func (m *QueryMedianDeviationsResponse) Size() (n int) { - if m == nil { - return 0 +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 - if len(m.MedianDeviations) > 0 { - for _, e := range m.MedianDeviations { - l = e.Size() - n += 1 + l + sovQuery(uint64(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 *QueryLatestPricesRequest) 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 *QueryLatestPricesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLatestPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Denoms) > 0 { + for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Denoms[iNdEx]) + copy(dAtA[i:], m.Denoms[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denoms[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryLatestPricesResponse) 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 *QueryLatestPricesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLatestPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Prices[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 *QueryAllLatestPricesRequest) 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 *QueryAllLatestPricesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllLatestPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAllLatestPricesResponse) 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 *QueryAllLatestPricesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllLatestPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Prices[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 *QueryPriceHistoryRequest) 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 *QueryPriceHistoryRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPriceHistoryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Asset))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPriceHistoryResponse) 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 *QueryPriceHistoryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPriceHistoryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Prices[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 *QueryPoolRequest) 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 *QueryPoolRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPoolResponse) 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 *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Pool.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 *QueryPoolAllRequest) 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 *QueryPoolAllRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolAllRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryPoolAllResponse) 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 *QueryPoolAllResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pool) > 0 { + for iNdEx := len(m.Pool) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pool[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 *QueryAccountedPoolRequest) 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 *QueryAccountedPoolRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountedPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountedPoolResponse) 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 *QueryAccountedPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountedPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.AccountedPool.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 *QueryAccountedPoolAllRequest) 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 *QueryAccountedPoolAllRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountedPoolAllRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAccountedPoolAllResponse) 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 *QueryAccountedPoolAllResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountedPoolAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountedPool) > 0 { + for iNdEx := len(m.AccountedPool) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountedPool[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 *QueryAssetInfoRequest) 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 *QueryAssetInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAssetInfoRequest) 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 *QueryAssetInfoResponse) 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 *QueryAssetInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAssetInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.AssetInfo.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 *QueryAssetInfoAllRequest) 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 *QueryAssetInfoAllRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAssetInfoAllRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAssetInfoAllResponse) 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 *QueryAssetInfoAllResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAssetInfoAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AssetInfo) > 0 { + for iNdEx := len(m.AssetInfo) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AssetInfo[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 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 *QueryLatestPricesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Denoms) > 0 { + for _, s := range m.Denoms { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLatestPricesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllLatestPricesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAllLatestPricesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPriceHistoryRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Asset) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPriceHistoryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPoolRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + return n +} + +func (m *QueryPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Pool.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryPoolAllRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryPoolAllResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pool) > 0 { + for _, e := range m.Pool { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAccountedPoolRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + return n +} + +func (m *QueryAccountedPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AccountedPool.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAccountedPoolAllRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAccountedPoolAllResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AccountedPool) > 0 { + for _, e := range m.AccountedPool { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAssetInfoRequest) 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 *QueryAssetInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AssetInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAssetInfoAllRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAssetInfoAllResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AssetInfo) > 0 { + for _, e := range m.AssetInfo { + l = e.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 } } - 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 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - l = m.Validators.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)))) + return nil } -func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { +func (m *QueryAggregateVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2870,17 +5910,17 @@ func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryExchangeRates: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAggregateVoteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryExchangeRates: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AggregateVote", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2890,23 +5930,24 @@ func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + if err := m.AggregateVote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2929,7 +5970,7 @@ func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryExchangeRatesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAggregateVotes) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2952,15 +5993,65 @@ func (m *QueryExchangeRatesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryExchangeRatesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAggregateVotes: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryExchangeRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + 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 ExchangeRates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AggregateVotes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2987,8 +6078,8 @@ func (m *QueryExchangeRatesResponse) Unmarshal(dAtA []byte) error { 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 { + m.AggregateVotes = append(m.AggregateVotes, AggregateExchangeRateVote{}) + if err := m.AggregateVotes[len(m.AggregateVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3013,7 +6104,7 @@ func (m *QueryExchangeRatesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryActiveExchangeRates) Unmarshal(dAtA []byte) error { +func (m *QueryParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3036,10 +6127,10 @@ func (m *QueryActiveExchangeRates) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryActiveExchangeRates: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryActiveExchangeRates: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3063,7 +6154,7 @@ func (m *QueryActiveExchangeRates) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryActiveExchangeRatesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3086,15 +6177,98 @@ func (m *QueryActiveExchangeRatesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryActiveExchangeRatesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryActiveExchangeRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + 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 ActiveRates", wireType) + 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 { @@ -3122,8 +6296,27 @@ func (m *QueryActiveExchangeRatesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ActiveRates = append(m.ActiveRates, string(dAtA[iNdEx:postIndex])) + 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:]) @@ -3145,7 +6338,7 @@ func (m *QueryActiveExchangeRatesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryFeederDelegation) Unmarshal(dAtA []byte) error { +func (m *QueryMediansResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3168,17 +6361,17 @@ func (m *QueryFeederDelegation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryFeederDelegation: wiretype end group for non-group") + return fmt.Errorf("proto: QueryMediansResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryFeederDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + 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 ValidatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Medians", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3188,23 +6381,25 @@ func (m *QueryFeederDelegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + 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 @@ -3227,7 +6422,7 @@ func (m *QueryFeederDelegation) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryFeederDelegationResponse) Unmarshal(dAtA []byte) error { +func (m *QueryMedianDeviations) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3250,15 +6445,15 @@ func (m *QueryFeederDelegationResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryFeederDelegationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryMedianDeviations: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryFeederDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + 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 FeederAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3286,7 +6481,7 @@ func (m *QueryFeederDelegationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FeederAddr = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3309,7 +6504,7 @@ func (m *QueryFeederDelegationResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMissCounter) Unmarshal(dAtA []byte) error { +func (m *QueryMedianDeviationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3332,17 +6527,17 @@ func (m *QueryMissCounter) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMissCounter: wiretype end group for non-group") + return fmt.Errorf("proto: QueryMedianDeviationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMissCounter: illegal tag %d (wire type %d)", fieldNum, wire) + 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 ValidatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MedianDeviations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3352,23 +6547,25 @@ func (m *QueryMissCounter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + 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 @@ -3391,7 +6588,7 @@ func (m *QueryMissCounter) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMissCounterResponse) Unmarshal(dAtA []byte) error { +func (m *QueryValidatorRewardSet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3414,31 +6611,12 @@ func (m *QueryMissCounterResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMissCounterResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryValidatorRewardSet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMissCounterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryValidatorRewardSet: 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:]) @@ -3460,7 +6638,7 @@ func (m *QueryMissCounterResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySlashWindow) Unmarshal(dAtA []byte) error { +func (m *QueryValidatorRewardSetResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3483,12 +6661,45 @@ func (m *QuerySlashWindow) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySlashWindow: wiretype end group for non-group") + return fmt.Errorf("proto: QueryValidatorRewardSetResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySlashWindow: illegal tag %d (wire type %d)", fieldNum, wire) + 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:]) @@ -3510,7 +6721,7 @@ func (m *QuerySlashWindow) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySlashWindowResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLatestPricesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3533,17 +6744,17 @@ func (m *QuerySlashWindowResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySlashWindowResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLatestPricesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySlashWindowResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLatestPricesRequest: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) } - m.WindowProgress = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3553,11 +6764,60 @@ func (m *QuerySlashWindowResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.WindowProgress |= uint64(b&0x7F) << shift + 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.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3579,7 +6839,7 @@ func (m *QuerySlashWindowResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregatePrevote) Unmarshal(dAtA []byte) error { +func (m *QueryLatestPricesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3602,17 +6862,17 @@ func (m *QueryAggregatePrevote) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregatePrevote: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLatestPricesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLatestPricesResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3622,24 +6882,112 @@ func (m *QueryAggregatePrevote) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Prices = append(m.Prices, &LatestPrice{}) + if err := m.Prices[len(m.Prices)-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 Pagination", 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.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryAllLatestPricesRequest) 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: QueryAllLatestPricesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllLatestPricesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3661,7 +7009,7 @@ func (m *QueryAggregatePrevote) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregatePrevoteResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllLatestPricesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3684,15 +7032,15 @@ func (m *QueryAggregatePrevoteResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregatePrevoteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllLatestPricesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregatePrevoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllLatestPricesResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3719,7 +7067,44 @@ func (m *QueryAggregatePrevoteResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.AggregatePrevote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Prices = append(m.Prices, &LatestPrice{}) + if err := m.Prices[len(m.Prices)-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 Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3744,7 +7129,7 @@ func (m *QueryAggregatePrevoteResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregatePrevotes) Unmarshal(dAtA []byte) error { +func (m *QueryPriceHistoryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3767,12 +7152,44 @@ func (m *QueryAggregatePrevotes) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregatePrevotes: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPriceHistoryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregatePrevotes: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPriceHistoryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", 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.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3794,7 +7211,7 @@ func (m *QueryAggregatePrevotes) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregatePrevotesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPriceHistoryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3817,15 +7234,15 @@ func (m *QueryAggregatePrevotesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregatePrevotesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPriceHistoryResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregatePrevotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPriceHistoryResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3852,8 +7269,44 @@ func (m *QueryAggregatePrevotesResponse) Unmarshal(dAtA []byte) error { 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 { + m.Prices = append(m.Prices, &Price{}) + if err := m.Prices[len(m.Prices)-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 Pagination", 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 m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3878,7 +7331,7 @@ func (m *QueryAggregatePrevotesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregateVote) Unmarshal(dAtA []byte) error { +func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3901,17 +7354,17 @@ func (m *QueryAggregateVote) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregateVote: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregateVote: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolRequest: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) } - var stringLen uint64 + m.PoolId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3921,24 +7374,11 @@ func (m *QueryAggregateVote) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.PoolId |= 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:]) @@ -3960,7 +7400,7 @@ func (m *QueryAggregateVote) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregateVoteResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3983,15 +7423,15 @@ func (m *QueryAggregateVoteResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregateVoteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregateVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4018,7 +7458,7 @@ func (m *QueryAggregateVoteResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.AggregateVote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4043,7 +7483,7 @@ func (m *QueryAggregateVoteResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregateVotes) Unmarshal(dAtA []byte) error { +func (m *QueryPoolAllRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4066,10 +7506,10 @@ func (m *QueryAggregateVotes) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregateVotes: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolAllRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregateVotes: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolAllRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4093,7 +7533,7 @@ func (m *QueryAggregateVotes) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAggregateVotesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPoolAllResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4116,15 +7556,15 @@ func (m *QueryAggregateVotesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAggregateVotesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolAllResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAggregateVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolAllResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4151,8 +7591,8 @@ func (m *QueryAggregateVotesResponse) Unmarshal(dAtA []byte) error { 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 { + m.Pool = append(m.Pool, Pool{}) + if err := m.Pool[len(m.Pool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4177,7 +7617,7 @@ func (m *QueryAggregateVotesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParams) Unmarshal(dAtA []byte) error { +func (m *QueryAccountedPoolRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4200,12 +7640,31 @@ func (m *QueryParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParams: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountedPoolRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountedPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4227,7 +7686,7 @@ func (m *QueryParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAccountedPoolResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4250,15 +7709,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountedPoolResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountedPoolResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field AccountedPool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4285,7 +7744,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.AccountedPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4310,7 +7769,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMedians) Unmarshal(dAtA []byte) error { +func (m *QueryAccountedPoolAllRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4333,63 +7792,12 @@ func (m *QueryMedians) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMedians: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountedPoolAllRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMedians: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountedPoolAllRequest: 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:]) @@ -4411,7 +7819,7 @@ func (m *QueryMedians) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMediansResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAccountedPoolAllResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4434,15 +7842,15 @@ func (m *QueryMediansResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMediansResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountedPoolAllResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMediansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountedPoolAllResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field AccountedPool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4469,8 +7877,8 @@ func (m *QueryMediansResponse) Unmarshal(dAtA []byte) error { 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 { + m.AccountedPool = append(m.AccountedPool, AccountedPool{}) + if err := m.AccountedPool[len(m.AccountedPool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4495,7 +7903,7 @@ func (m *QueryMediansResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMedianDeviations) Unmarshal(dAtA []byte) error { +func (m *QueryAssetInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4518,10 +7926,10 @@ func (m *QueryMedianDeviations) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMedianDeviations: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAssetInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMedianDeviations: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAssetInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4577,7 +7985,7 @@ func (m *QueryMedianDeviations) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMedianDeviationsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAssetInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4600,15 +8008,15 @@ func (m *QueryMedianDeviationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMedianDeviationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAssetInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMedianDeviationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAssetInfoResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field AssetInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4635,8 +8043,7 @@ func (m *QueryMedianDeviationsResponse) Unmarshal(dAtA []byte) error { 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 { + if err := m.AssetInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4661,7 +8068,7 @@ func (m *QueryMedianDeviationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorRewardSet) Unmarshal(dAtA []byte) error { +func (m *QueryAssetInfoAllRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4684,10 +8091,10 @@ func (m *QueryValidatorRewardSet) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorRewardSet: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAssetInfoAllRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorRewardSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAssetInfoAllRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4711,7 +8118,7 @@ func (m *QueryValidatorRewardSet) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorRewardSetResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAssetInfoAllResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4734,15 +8141,15 @@ func (m *QueryValidatorRewardSetResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorRewardSetResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAssetInfoAllResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorRewardSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAssetInfoAllResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field AssetInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4769,7 +8176,8 @@ func (m *QueryValidatorRewardSetResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Validators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AssetInfo = append(m.AssetInfo, AssetInfo{}) + if err := m.AssetInfo[len(m.AssetInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 8f223b35..997e8497 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -483,13 +483,557 @@ func local_request_Query_ValidatorRewardSet_0(ctx context.Context, marshaler run } +var ( + filter_Query_LatestPrices_0 = &utilities.DoubleArray{Encoding: map[string]int{"denoms": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_LatestPrices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLatestPricesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denoms"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denoms") + } + + protoReq.Denoms, err = runtime.StringSlice(val, ",") + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denoms", 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_LatestPrices_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LatestPrices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LatestPrices_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLatestPricesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denoms"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denoms") + } + + protoReq.Denoms, err = runtime.StringSlice(val, ",") + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denoms", 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_LatestPrices_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LatestPrices(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AllLatestPrices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllLatestPricesRequest + var metadata runtime.ServerMetadata + + msg, err := client.AllLatestPrices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllLatestPrices_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllLatestPricesRequest + var metadata runtime.ServerMetadata + + msg, err := server.AllLatestPrices(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PriceHistory_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPriceHistoryRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["asset"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset") + } + + protoReq.Asset, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", err) + } + + msg, err := client.PriceHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PriceHistory_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPriceHistoryRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["asset"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset") + } + + protoReq.Asset, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", err) + } + + msg, err := server.PriceHistory(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Pool_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.Pool(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Pool_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.Pool(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PoolAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolAllRequest + var metadata runtime.ServerMetadata + + msg, err := client.PoolAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PoolAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPoolAllRequest + var metadata runtime.ServerMetadata + + msg, err := server.PoolAll(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AccountedPool_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountedPoolRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := client.AccountedPool(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AccountedPool_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountedPoolRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + msg, err := server.AccountedPool(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AccountedPoolAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountedPoolAllRequest + var metadata runtime.ServerMetadata + + msg, err := client.AccountedPoolAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AccountedPoolAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountedPoolAllRequest + var metadata runtime.ServerMetadata + + msg, err := server.AccountedPoolAll(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AssetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAssetInfoRequest + 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.AssetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AssetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAssetInfoRequest + 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.AssetInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AssetInfoAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAssetInfoAllRequest + var metadata runtime.ServerMetadata + + msg, err := client.AssetInfoAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AssetInfoAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAssetInfoAllRequest + var metadata runtime.ServerMetadata + + msg, err := server.AssetInfoAll(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) { + 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 @@ -500,7 +1044,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ExchangeRates_0(rctx, inboundMarshaler, server, req, pathParams) + 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 { @@ -508,11 +1052,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ExchangeRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AggregateVotes_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) { + 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 @@ -523,7 +1067,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ActiveExchangeRates_0(rctx, inboundMarshaler, server, req, pathParams) + 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 { @@ -531,11 +1075,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ActiveExchangeRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Params_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) { + 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 @@ -546,7 +1090,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_FeederDelegation_0(rctx, inboundMarshaler, server, req, pathParams) + 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 { @@ -554,11 +1098,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_FeederDelegation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Medians_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) { + 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 @@ -569,7 +1113,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_MissCounter_0(rctx, inboundMarshaler, server, req, pathParams) + 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 { @@ -577,11 +1121,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_MissCounter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_MedianDeviations_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) { + 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 @@ -592,7 +1136,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_SlashWindow_0(rctx, inboundMarshaler, server, req, pathParams) + 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 { @@ -600,11 +1144,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_SlashWindow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ValidatorRewardSet_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) { + mux.Handle("GET", pattern_Query_LatestPrices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -615,7 +1159,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AggregatePrevote_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_LatestPrices_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 { @@ -623,11 +1167,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_AggregatePrevote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_LatestPrices_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) { + mux.Handle("GET", pattern_Query_AllLatestPrices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -638,7 +1182,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AggregatePrevotes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AllLatestPrices_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 { @@ -646,11 +1190,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_AggregatePrevotes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AllLatestPrices_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) { + mux.Handle("GET", pattern_Query_PriceHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -661,7 +1205,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AggregateVote_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_PriceHistory_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 { @@ -669,11 +1213,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_AggregateVote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_PriceHistory_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) { + mux.Handle("GET", pattern_Query_Pool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -684,7 +1228,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AggregateVotes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Pool_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 { @@ -692,11 +1236,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_AggregateVotes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Pool_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) { + mux.Handle("GET", pattern_Query_PoolAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -707,7 +1251,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_PoolAll_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 { @@ -715,11 +1259,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_PoolAll_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) { + mux.Handle("GET", pattern_Query_AccountedPool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -730,7 +1274,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Medians_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AccountedPool_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 { @@ -738,11 +1282,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Medians_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AccountedPool_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) { + mux.Handle("GET", pattern_Query_AccountedPoolAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -753,7 +1297,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_MedianDeviations_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AccountedPoolAll_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 { @@ -761,11 +1305,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_MedianDeviations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AccountedPoolAll_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) { + mux.Handle("GET", pattern_Query_AssetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -776,7 +1320,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ValidatorRewardSet_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AssetInfo_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 { @@ -784,7 +1328,30 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ValidatorRewardSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AssetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AssetInfoAll_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_AssetInfoAll_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_AssetInfoAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1089,6 +1656,186 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_LatestPrices_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_LatestPrices_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_LatestPrices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllLatestPrices_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_AllLatestPrices_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_AllLatestPrices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PriceHistory_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_PriceHistory_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_PriceHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Pool_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_Pool_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_Pool_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PoolAll_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_PoolAll_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_PoolAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AccountedPool_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_AccountedPool_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_AccountedPool_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AccountedPoolAll_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_AccountedPoolAll_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_AccountedPoolAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AssetInfo_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_AssetInfo_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_AssetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AssetInfoAll_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_AssetInfoAll_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_AssetInfoAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1118,6 +1865,24 @@ var ( pattern_Query_MedianDeviations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ojo", "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, 2, 4}, []string{"ojo", "oracle", "v1", "valdiators", "validator_reward_set"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_LatestPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "oracle", "latest_prices", "denoms"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllLatestPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "oracle", "all_latest_prices"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PriceHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "oracle", "price_history", "asset"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Pool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "oracle", "pool", "pool_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PoolAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "oracle", "pool"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AccountedPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "oracle", "accounted_pool", "pool_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AccountedPoolAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "oracle", "accounted_pool"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AssetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "oracle", "asset_info", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AssetInfoAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "oracle", "asset_info"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1146,4 +1911,22 @@ var ( forward_Query_MedianDeviations_0 = runtime.ForwardResponseMessage forward_Query_ValidatorRewardSet_0 = runtime.ForwardResponseMessage + + forward_Query_LatestPrices_0 = runtime.ForwardResponseMessage + + forward_Query_AllLatestPrices_0 = runtime.ForwardResponseMessage + + forward_Query_PriceHistory_0 = runtime.ForwardResponseMessage + + forward_Query_Pool_0 = runtime.ForwardResponseMessage + + forward_Query_PoolAll_0 = runtime.ForwardResponseMessage + + forward_Query_AccountedPool_0 = runtime.ForwardResponseMessage + + forward_Query_AccountedPoolAll_0 = runtime.ForwardResponseMessage + + forward_Query_AssetInfo_0 = runtime.ForwardResponseMessage + + forward_Query_AssetInfoAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 95b0b353..5855dc27 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -273,27 +273,24 @@ func (m *MsgDelegateFeedConsentResponse) XXX_DiscardUnknown() { 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"` +// FeedPrice defines a feed price object for feeding an elys price. +type FeedPrice struct { + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` } -func (m *MsgLegacyGovUpdateParams) Reset() { *m = MsgLegacyGovUpdateParams{} } -func (*MsgLegacyGovUpdateParams) ProtoMessage() {} -func (*MsgLegacyGovUpdateParams) Descriptor() ([]byte, []int) { +func (m *FeedPrice) Reset() { *m = FeedPrice{} } +func (m *FeedPrice) String() string { return proto.CompactTextString(m) } +func (*FeedPrice) ProtoMessage() {} +func (*FeedPrice) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{6} } -func (m *MsgLegacyGovUpdateParams) XXX_Unmarshal(b []byte) error { +func (m *FeedPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgLegacyGovUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *FeedPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgLegacyGovUpdateParams.Marshal(b, m, deterministic) + return xxx_messageInfo_FeedPrice.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -303,34 +300,36 @@ func (m *MsgLegacyGovUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgLegacyGovUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgLegacyGovUpdateParams.Merge(m, src) +func (m *FeedPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeedPrice.Merge(m, src) } -func (m *MsgLegacyGovUpdateParams) XXX_Size() int { +func (m *FeedPrice) XXX_Size() int { return m.Size() } -func (m *MsgLegacyGovUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgLegacyGovUpdateParams.DiscardUnknown(m) +func (m *FeedPrice) XXX_DiscardUnknown() { + xxx_messageInfo_FeedPrice.DiscardUnknown(m) } -var xxx_messageInfo_MsgLegacyGovUpdateParams proto.InternalMessageInfo +var xxx_messageInfo_FeedPrice proto.InternalMessageInfo -// MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams response type. -type MsgLegacyGovUpdateParamsResponse struct { +// MsgFeedPrice defines a message to feed an elys price. +type MsgFeedPrice struct { + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` + FeedPrice FeedPrice `protobuf:"bytes,2,opt,name=feed_price,json=feedPrice,proto3" json:"feed_price"` } -func (m *MsgLegacyGovUpdateParamsResponse) Reset() { *m = MsgLegacyGovUpdateParamsResponse{} } -func (m *MsgLegacyGovUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgLegacyGovUpdateParamsResponse) ProtoMessage() {} -func (*MsgLegacyGovUpdateParamsResponse) Descriptor() ([]byte, []int) { +func (m *MsgFeedPrice) Reset() { *m = MsgFeedPrice{} } +func (m *MsgFeedPrice) String() string { return proto.CompactTextString(m) } +func (*MsgFeedPrice) ProtoMessage() {} +func (*MsgFeedPrice) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{7} } -func (m *MsgLegacyGovUpdateParamsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgFeedPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgLegacyGovUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgFeedPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgFeedPrice.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -340,41 +339,35 @@ func (m *MsgLegacyGovUpdateParamsResponse) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *MsgLegacyGovUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.Merge(m, src) +func (m *MsgFeedPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFeedPrice.Merge(m, src) } -func (m *MsgLegacyGovUpdateParamsResponse) XXX_Size() int { +func (m *MsgFeedPrice) XXX_Size() int { return m.Size() } -func (m *MsgLegacyGovUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.DiscardUnknown(m) +func (m *MsgFeedPrice) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFeedPrice.DiscardUnknown(m) } -var xxx_messageInfo_MsgLegacyGovUpdateParamsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgFeedPrice 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"` +// MsgFeedPriceResponse defines the Msg/FeedPrice response +// type. +type MsgFeedPriceResponse struct { } -func (m *MsgGovUpdateParams) Reset() { *m = MsgGovUpdateParams{} } -func (*MsgGovUpdateParams) ProtoMessage() {} -func (*MsgGovUpdateParams) Descriptor() ([]byte, []int) { +func (m *MsgFeedPriceResponse) Reset() { *m = MsgFeedPriceResponse{} } +func (m *MsgFeedPriceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFeedPriceResponse) ProtoMessage() {} +func (*MsgFeedPriceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{8} } -func (m *MsgGovUpdateParams) XXX_Unmarshal(b []byte) error { +func (m *MsgFeedPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgFeedPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovUpdateParams.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgFeedPriceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -384,34 +377,36 @@ func (m *MsgGovUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *MsgGovUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovUpdateParams.Merge(m, src) +func (m *MsgFeedPriceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFeedPriceResponse.Merge(m, src) } -func (m *MsgGovUpdateParams) XXX_Size() int { +func (m *MsgFeedPriceResponse) XXX_Size() int { return m.Size() } -func (m *MsgGovUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovUpdateParams.DiscardUnknown(m) +func (m *MsgFeedPriceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFeedPriceResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovUpdateParams proto.InternalMessageInfo +var xxx_messageInfo_MsgFeedPriceResponse proto.InternalMessageInfo -// MsgGovUpdateParamsResponse defines the Msg/GovUpdateParams response type. -type MsgGovUpdateParamsResponse struct { +// MsgSetPriceFeeder defines a message to set an elys price feeder. +type MsgSetPriceFeeder struct { + Feeder string `protobuf:"bytes,1,opt,name=feeder,proto3" json:"feeder,omitempty"` + IsActive bool `protobuf:"varint,2,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` } -func (m *MsgGovUpdateParamsResponse) Reset() { *m = MsgGovUpdateParamsResponse{} } -func (m *MsgGovUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgGovUpdateParamsResponse) ProtoMessage() {} -func (*MsgGovUpdateParamsResponse) Descriptor() ([]byte, []int) { +func (m *MsgSetPriceFeeder) Reset() { *m = MsgSetPriceFeeder{} } +func (m *MsgSetPriceFeeder) String() string { return proto.CompactTextString(m) } +func (*MsgSetPriceFeeder) ProtoMessage() {} +func (*MsgSetPriceFeeder) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{9} } -func (m *MsgGovUpdateParamsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSetPriceFeeder) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetPriceFeeder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovUpdateParamsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetPriceFeeder.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -421,54 +416,35 @@ func (m *MsgGovUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *MsgGovUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovUpdateParamsResponse.Merge(m, src) +func (m *MsgSetPriceFeeder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetPriceFeeder.Merge(m, src) } -func (m *MsgGovUpdateParamsResponse) XXX_Size() int { +func (m *MsgSetPriceFeeder) XXX_Size() int { return m.Size() } -func (m *MsgGovUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovUpdateParamsResponse.DiscardUnknown(m) +func (m *MsgSetPriceFeeder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetPriceFeeder.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovUpdateParamsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgSetPriceFeeder 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"` +// MsgSetPriceFeederResponse defines the Msg/SetPriceFeederResponse response +// type. +type MsgSetPriceFeederResponse struct { } -func (m *MsgGovAddDenoms) Reset() { *m = MsgGovAddDenoms{} } -func (*MsgGovAddDenoms) ProtoMessage() {} -func (*MsgGovAddDenoms) Descriptor() ([]byte, []int) { +func (m *MsgSetPriceFeederResponse) Reset() { *m = MsgSetPriceFeederResponse{} } +func (m *MsgSetPriceFeederResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetPriceFeederResponse) ProtoMessage() {} +func (*MsgSetPriceFeederResponse) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{10} } -func (m *MsgGovAddDenoms) XXX_Unmarshal(b []byte) error { +func (m *MsgSetPriceFeederResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovAddDenoms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetPriceFeederResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovAddDenoms.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetPriceFeederResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -478,34 +454,35 @@ func (m *MsgGovAddDenoms) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *MsgGovAddDenoms) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovAddDenoms.Merge(m, src) +func (m *MsgSetPriceFeederResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetPriceFeederResponse.Merge(m, src) } -func (m *MsgGovAddDenoms) XXX_Size() int { +func (m *MsgSetPriceFeederResponse) XXX_Size() int { return m.Size() } -func (m *MsgGovAddDenoms) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovAddDenoms.DiscardUnknown(m) +func (m *MsgSetPriceFeederResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetPriceFeederResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovAddDenoms proto.InternalMessageInfo +var xxx_messageInfo_MsgSetPriceFeederResponse proto.InternalMessageInfo -// MsgGovAddDenomResponse defines the Msg/GovAddDenomResponse response type. -type MsgGovAddDenomsResponse struct { +// MsgDeletePriceFeeder defines a message to delete an elys price feeder. +type MsgDeletePriceFeeder struct { + Feeder string `protobuf:"bytes,1,opt,name=feeder,proto3" json:"feeder,omitempty"` } -func (m *MsgGovAddDenomsResponse) Reset() { *m = MsgGovAddDenomsResponse{} } -func (m *MsgGovAddDenomsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgGovAddDenomsResponse) ProtoMessage() {} -func (*MsgGovAddDenomsResponse) Descriptor() ([]byte, []int) { +func (m *MsgDeletePriceFeeder) Reset() { *m = MsgDeletePriceFeeder{} } +func (m *MsgDeletePriceFeeder) String() string { return proto.CompactTextString(m) } +func (*MsgDeletePriceFeeder) ProtoMessage() {} +func (*MsgDeletePriceFeeder) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{11} } -func (m *MsgGovAddDenomsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgDeletePriceFeeder) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovAddDenomsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDeletePriceFeeder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovAddDenomsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDeletePriceFeeder.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -515,43 +492,35 @@ func (m *MsgGovAddDenomsResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgGovAddDenomsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovAddDenomsResponse.Merge(m, src) +func (m *MsgDeletePriceFeeder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeletePriceFeeder.Merge(m, src) } -func (m *MsgGovAddDenomsResponse) XXX_Size() int { +func (m *MsgDeletePriceFeeder) XXX_Size() int { return m.Size() } -func (m *MsgGovAddDenomsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovAddDenomsResponse.DiscardUnknown(m) +func (m *MsgDeletePriceFeeder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeletePriceFeeder.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovAddDenomsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgDeletePriceFeeder 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"` +// MsgDeletePriceFeederResponse defines the Msg/DeleteFeederResponse response +// type. +type MsgDeletePriceFeederResponse struct { } -func (m *MsgGovRemoveCurrencyPairProviders) Reset() { *m = MsgGovRemoveCurrencyPairProviders{} } -func (*MsgGovRemoveCurrencyPairProviders) ProtoMessage() {} -func (*MsgGovRemoveCurrencyPairProviders) Descriptor() ([]byte, []int) { +func (m *MsgDeletePriceFeederResponse) Reset() { *m = MsgDeletePriceFeederResponse{} } +func (m *MsgDeletePriceFeederResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeletePriceFeederResponse) ProtoMessage() {} +func (*MsgDeletePriceFeederResponse) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{12} } -func (m *MsgGovRemoveCurrencyPairProviders) XXX_Unmarshal(b []byte) error { +func (m *MsgDeletePriceFeederResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovRemoveCurrencyPairProviders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDeletePriceFeederResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovRemoveCurrencyPairProviders.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDeletePriceFeederResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -561,38 +530,36 @@ func (m *MsgGovRemoveCurrencyPairProviders) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgGovRemoveCurrencyPairProviders) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovRemoveCurrencyPairProviders.Merge(m, src) +func (m *MsgDeletePriceFeederResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeletePriceFeederResponse.Merge(m, src) } -func (m *MsgGovRemoveCurrencyPairProviders) XXX_Size() int { +func (m *MsgDeletePriceFeederResponse) XXX_Size() int { return m.Size() } -func (m *MsgGovRemoveCurrencyPairProviders) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovRemoveCurrencyPairProviders.DiscardUnknown(m) +func (m *MsgDeletePriceFeederResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeletePriceFeederResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovRemoveCurrencyPairProviders proto.InternalMessageInfo +var xxx_messageInfo_MsgDeletePriceFeederResponse proto.InternalMessageInfo -// MsgGovRemoveCurrencyPairProvidersResponse defines the Msg/GovRemoveCurrencyPairProvidersResponse response type. -type MsgGovRemoveCurrencyPairProvidersResponse struct { +// MsgFeedMultiplePrices defines a message to feed multiple elys prices. +type MsgFeedMultiplePrices struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + FeedPrices []FeedPrice `protobuf:"bytes,2,rep,name=feed_prices,json=feedPrices,proto3" json:"feed_prices"` } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) Reset() { - *m = MsgGovRemoveCurrencyPairProvidersResponse{} -} -func (m *MsgGovRemoveCurrencyPairProvidersResponse) String() string { - return proto.CompactTextString(m) -} -func (*MsgGovRemoveCurrencyPairProvidersResponse) ProtoMessage() {} -func (*MsgGovRemoveCurrencyPairProvidersResponse) Descriptor() ([]byte, []int) { +func (m *MsgFeedMultiplePrices) Reset() { *m = MsgFeedMultiplePrices{} } +func (m *MsgFeedMultiplePrices) String() string { return proto.CompactTextString(m) } +func (*MsgFeedMultiplePrices) ProtoMessage() {} +func (*MsgFeedMultiplePrices) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{13} } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgFeedMultiplePrices) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgFeedMultiplePrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgFeedMultiplePrices.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -602,45 +569,35 @@ func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Marshal(b []byte, determ return b[:n], nil } } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse.Merge(m, src) +func (m *MsgFeedMultiplePrices) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFeedMultiplePrices.Merge(m, src) } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Size() int { +func (m *MsgFeedMultiplePrices) XXX_Size() int { return m.Size() } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse.DiscardUnknown(m) +func (m *MsgFeedMultiplePrices) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFeedMultiplePrices.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgFeedMultiplePrices 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"` +// MsgFeedMultiplePricesResponse defines the Msg/FeedMultiplePrices response +// type. +type MsgFeedMultiplePricesResponse struct { } -func (m *MsgGovRemoveCurrencyDeviationThresholds) Reset() { - *m = MsgGovRemoveCurrencyDeviationThresholds{} -} -func (*MsgGovRemoveCurrencyDeviationThresholds) ProtoMessage() {} -func (*MsgGovRemoveCurrencyDeviationThresholds) Descriptor() ([]byte, []int) { +func (m *MsgFeedMultiplePricesResponse) Reset() { *m = MsgFeedMultiplePricesResponse{} } +func (m *MsgFeedMultiplePricesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFeedMultiplePricesResponse) ProtoMessage() {} +func (*MsgFeedMultiplePricesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{14} } -func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Unmarshal(b []byte) error { +func (m *MsgFeedMultiplePricesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgFeedMultiplePricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgFeedMultiplePricesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -650,38 +607,36 @@ func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Marshal(b []byte, determin return b[:n], nil } } -func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds.Merge(m, src) +func (m *MsgFeedMultiplePricesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFeedMultiplePricesResponse.Merge(m, src) } -func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Size() int { +func (m *MsgFeedMultiplePricesResponse) XXX_Size() int { return m.Size() } -func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds.DiscardUnknown(m) +func (m *MsgFeedMultiplePricesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFeedMultiplePricesResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds proto.InternalMessageInfo +var xxx_messageInfo_MsgFeedMultiplePricesResponse proto.InternalMessageInfo -// MsgGovRemoveCurrencyDeviationThresholdsResponse defines the Msg/GovRemoveCurrencyDeviationThresholdsResponse response type. -type MsgGovRemoveCurrencyDeviationThresholdsResponse struct { +// MsgRemoveAssetInfo represents a message to remove an elys asset info. +type MsgRemoveAssetInfo struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Reset() { - *m = MsgGovRemoveCurrencyDeviationThresholdsResponse{} -} -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) String() string { - return proto.CompactTextString(m) -} -func (*MsgGovRemoveCurrencyDeviationThresholdsResponse) ProtoMessage() {} -func (*MsgGovRemoveCurrencyDeviationThresholdsResponse) Descriptor() ([]byte, []int) { +func (m *MsgRemoveAssetInfo) Reset() { *m = MsgRemoveAssetInfo{} } +func (m *MsgRemoveAssetInfo) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveAssetInfo) ProtoMessage() {} +func (*MsgRemoveAssetInfo) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{15} } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgRemoveAssetInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRemoveAssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRemoveAssetInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -691,41 +646,35 @@ func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Marshal(b []byte, return b[:n], nil } } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse.Merge(m, src) +func (m *MsgRemoveAssetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveAssetInfo.Merge(m, src) } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Size() int { +func (m *MsgRemoveAssetInfo) XXX_Size() int { return m.Size() } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse.DiscardUnknown(m) +func (m *MsgRemoveAssetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveAssetInfo.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgRemoveAssetInfo 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"` +// MsgRemoveAssetInfo defines the Msg/RemoveAssetInfo response +// type. +type MsgRemoveAssetInfoResponse struct { } -func (m *MsgGovCancelUpdateParamPlan) Reset() { *m = MsgGovCancelUpdateParamPlan{} } -func (*MsgGovCancelUpdateParamPlan) ProtoMessage() {} -func (*MsgGovCancelUpdateParamPlan) Descriptor() ([]byte, []int) { +func (m *MsgRemoveAssetInfoResponse) Reset() { *m = MsgRemoveAssetInfoResponse{} } +func (m *MsgRemoveAssetInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveAssetInfoResponse) ProtoMessage() {} +func (*MsgRemoveAssetInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{16} } -func (m *MsgGovCancelUpdateParamPlan) XXX_Unmarshal(b []byte) error { +func (m *MsgRemoveAssetInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovCancelUpdateParamPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRemoveAssetInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovCancelUpdateParamPlan.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRemoveAssetInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -735,34 +684,36 @@ func (m *MsgGovCancelUpdateParamPlan) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgGovCancelUpdateParamPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovCancelUpdateParamPlan.Merge(m, src) +func (m *MsgRemoveAssetInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveAssetInfoResponse.Merge(m, src) } -func (m *MsgGovCancelUpdateParamPlan) XXX_Size() int { +func (m *MsgRemoveAssetInfoResponse) XXX_Size() int { return m.Size() } -func (m *MsgGovCancelUpdateParamPlan) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovCancelUpdateParamPlan.DiscardUnknown(m) +func (m *MsgRemoveAssetInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveAssetInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovCancelUpdateParamPlan proto.InternalMessageInfo +var xxx_messageInfo_MsgRemoveAssetInfoResponse proto.InternalMessageInfo -// MsgGovCancelUpdateParamPlanResponse defines the Msg/GovCancelUpdateParamPlanResponse response type. -type MsgGovCancelUpdateParamPlanResponse struct { +// MsgAddPriceFeeders represents a message to add elys price feeders. +type MsgAddPriceFeeders struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Feeders []string `protobuf:"bytes,2,rep,name=feeders,proto3" json:"feeders,omitempty"` } -func (m *MsgGovCancelUpdateParamPlanResponse) Reset() { *m = MsgGovCancelUpdateParamPlanResponse{} } -func (m *MsgGovCancelUpdateParamPlanResponse) String() string { return proto.CompactTextString(m) } -func (*MsgGovCancelUpdateParamPlanResponse) ProtoMessage() {} -func (*MsgGovCancelUpdateParamPlanResponse) Descriptor() ([]byte, []int) { +func (m *MsgAddPriceFeeders) Reset() { *m = MsgAddPriceFeeders{} } +func (m *MsgAddPriceFeeders) String() string { return proto.CompactTextString(m) } +func (*MsgAddPriceFeeders) ProtoMessage() {} +func (*MsgAddPriceFeeders) Descriptor() ([]byte, []int) { return fileDescriptor_58d45810177a43e8, []int{17} } -func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAddPriceFeeders) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAddPriceFeeders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAddPriceFeeders.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -772,1857 +723,5014 @@ func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.Merge(m, src) +func (m *MsgAddPriceFeeders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddPriceFeeders.Merge(m, src) } -func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Size() int { +func (m *MsgAddPriceFeeders) XXX_Size() int { return m.Size() } -func (m *MsgGovCancelUpdateParamPlanResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.DiscardUnknown(m) +func (m *MsgAddPriceFeeders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddPriceFeeders.DiscardUnknown(m) } -var xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAddPriceFeeders proto.InternalMessageInfo -func init() { - proto.RegisterType((*MsgAggregateExchangeRatePrevote)(nil), "ojo.oracle.v1.MsgAggregateExchangeRatePrevote") - proto.RegisterType((*MsgAggregateExchangeRatePrevoteResponse)(nil), "ojo.oracle.v1.MsgAggregateExchangeRatePrevoteResponse") - proto.RegisterType((*MsgAggregateExchangeRateVote)(nil), "ojo.oracle.v1.MsgAggregateExchangeRateVote") - proto.RegisterType((*MsgAggregateExchangeRateVoteResponse)(nil), "ojo.oracle.v1.MsgAggregateExchangeRateVoteResponse") - proto.RegisterType((*MsgDelegateFeedConsent)(nil), "ojo.oracle.v1.MsgDelegateFeedConsent") - proto.RegisterType((*MsgDelegateFeedConsentResponse)(nil), "ojo.oracle.v1.MsgDelegateFeedConsentResponse") - proto.RegisterType((*MsgLegacyGovUpdateParams)(nil), "ojo.oracle.v1.MsgLegacyGovUpdateParams") - proto.RegisterType((*MsgLegacyGovUpdateParamsResponse)(nil), "ojo.oracle.v1.MsgLegacyGovUpdateParamsResponse") - proto.RegisterType((*MsgGovUpdateParams)(nil), "ojo.oracle.v1.MsgGovUpdateParams") - proto.RegisterType((*MsgGovUpdateParamsResponse)(nil), "ojo.oracle.v1.MsgGovUpdateParamsResponse") - proto.RegisterType((*MsgGovAddDenoms)(nil), "ojo.oracle.v1.MsgGovAddDenoms") - proto.RegisterType((*MsgGovAddDenomsResponse)(nil), "ojo.oracle.v1.MsgGovAddDenomsResponse") - proto.RegisterType((*MsgGovRemoveCurrencyPairProviders)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyPairProviders") - proto.RegisterType((*MsgGovRemoveCurrencyPairProvidersResponse)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse") - proto.RegisterType((*MsgGovRemoveCurrencyDeviationThresholds)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyDeviationThresholds") - proto.RegisterType((*MsgGovRemoveCurrencyDeviationThresholdsResponse)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse") - proto.RegisterType((*MsgGovCancelUpdateParamPlan)(nil), "ojo.oracle.v1.MsgGovCancelUpdateParamPlan") - proto.RegisterType((*MsgGovCancelUpdateParamPlanResponse)(nil), "ojo.oracle.v1.MsgGovCancelUpdateParamPlanResponse") +// MsgAddPriceFeedersResponse defines the Msg/AddPriceFeeders response +// type. +type MsgAddPriceFeedersResponse struct { } -func init() { proto.RegisterFile("ojo/oracle/v1/tx.proto", fileDescriptor_58d45810177a43e8) } +func (m *MsgAddPriceFeedersResponse) Reset() { *m = MsgAddPriceFeedersResponse{} } +func (m *MsgAddPriceFeedersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddPriceFeedersResponse) ProtoMessage() {} +func (*MsgAddPriceFeedersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{18} +} +func (m *MsgAddPriceFeedersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddPriceFeedersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddPriceFeedersResponse.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 *MsgAddPriceFeedersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddPriceFeedersResponse.Merge(m, src) +} +func (m *MsgAddPriceFeedersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddPriceFeedersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddPriceFeedersResponse.DiscardUnknown(m) +} -var fileDescriptor_58d45810177a43e8 = []byte{ - // 1185 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xc6, 0x4e, 0x1a, 0x3f, 0x53, 0x22, 0xb6, 0xf9, 0xb1, 0xd9, 0xa4, 0x6b, 0x67, 0x9b, - 0xb6, 0x49, 0xab, 0xd8, 0x4d, 0x2a, 0xaa, 0x2a, 0xe2, 0x57, 0x9c, 0xd0, 0x5e, 0x1a, 0x14, 0x2d, - 0x90, 0x03, 0x12, 0xb2, 0x26, 0xbb, 0xc3, 0x7a, 0x13, 0x7b, 0xc7, 0xcc, 0x4c, 0xdc, 0x18, 0x89, - 0x0b, 0x07, 0xc4, 0x01, 0x24, 0x8e, 0x9c, 0x50, 0xb9, 0x56, 0x42, 0xe2, 0xd0, 0x2b, 0x07, 0x6e, - 0x39, 0xa1, 0x2a, 0x27, 0xd4, 0x83, 0x0b, 0xc9, 0x01, 0x24, 0xc4, 0x81, 0xfc, 0x05, 0x68, 0x67, - 0xd7, 0x6b, 0xc7, 0x5e, 0x3b, 0x4e, 0x85, 0xd4, 0xdc, 0x76, 0xe6, 0x7d, 0xef, 0xbd, 0xef, 0xfb, - 0x66, 0x76, 0x76, 0xb4, 0x30, 0x4e, 0xb6, 0x49, 0x8e, 0x50, 0x64, 0x96, 0x70, 0xae, 0xba, 0x98, - 0xe3, 0x7b, 0xd9, 0x0a, 0x25, 0x9c, 0xc8, 0x17, 0xc9, 0x36, 0xc9, 0xfa, 0xf3, 0xd9, 0xea, 0xa2, - 0x3a, 0x61, 0x12, 0x56, 0x26, 0x2c, 0x57, 0x66, 0xb6, 0x07, 0x2b, 0x33, 0xdb, 0xc7, 0xa9, 0x93, - 0x7e, 0xa0, 0x20, 0x46, 0x39, 0x7f, 0x10, 0x84, 0x46, 0x6d, 0x62, 0x13, 0x7f, 0xde, 0x7b, 0x0a, - 0x66, 0xd5, 0x93, 0x0d, 0x83, 0x16, 0x22, 0xa6, 0xff, 0x2a, 0x41, 0x7a, 0x9d, 0xd9, 0x2b, 0xb6, - 0x4d, 0xb1, 0x8d, 0x38, 0x7e, 0x77, 0xcf, 0x2c, 0x22, 0xd7, 0xc6, 0x06, 0xe2, 0x78, 0x83, 0xe2, - 0x2a, 0xe1, 0x58, 0xbe, 0x02, 0x89, 0x22, 0x62, 0x45, 0x45, 0xca, 0x48, 0x73, 0xc9, 0xfc, 0xc8, - 0x71, 0x3d, 0x9d, 0xaa, 0xa1, 0x72, 0x69, 0x59, 0xf7, 0x66, 0x75, 0x43, 0x04, 0xe5, 0x5b, 0x30, - 0xf4, 0x09, 0xc6, 0x16, 0xa6, 0xca, 0x80, 0x80, 0x29, 0x07, 0x4f, 0x16, 0x46, 0x03, 0x72, 0x2b, - 0x96, 0x45, 0x31, 0x63, 0xef, 0x73, 0xea, 0xb8, 0xb6, 0x11, 0xe0, 0xe4, 0xb7, 0x21, 0x59, 0x45, - 0x25, 0xc7, 0x42, 0x9c, 0x50, 0x25, 0x2e, 0x92, 0x66, 0x0e, 0x9e, 0x2c, 0x5c, 0x0e, 0x92, 0x36, - 0x1b, 0xb1, 0x93, 0xd9, 0xcd, 0x9c, 0xe5, 0x4b, 0x5f, 0x3d, 0x4a, 0xc7, 0xfe, 0x7a, 0x94, 0x8e, - 0x7d, 0xf1, 0xe7, 0x4f, 0x37, 0x82, 0xaa, 0xfa, 0x3c, 0x5c, 0x3f, 0x45, 0x8f, 0x81, 0x59, 0x85, - 0xb8, 0x0c, 0xeb, 0xdf, 0x0c, 0xc0, 0x74, 0x37, 0xec, 0x66, 0x20, 0x9c, 0xa1, 0x12, 0xef, 0x14, - 0xee, 0xcd, 0xea, 0x86, 0x08, 0xca, 0xef, 0xc0, 0xab, 0x38, 0x48, 0x2c, 0x50, 0xc4, 0x31, 0x0b, - 0x0c, 0x98, 0x3c, 0xae, 0xa7, 0xc7, 0x7c, 0xf8, 0xc9, 0xb8, 0x6e, 0x5c, 0xc4, 0x2d, 0x9d, 0x58, - 0x8b, 0x75, 0xf1, 0x17, 0xb1, 0x2e, 0xf1, 0x7f, 0x59, 0x77, 0x0d, 0x66, 0x7b, 0xd9, 0x11, 0xfa, - 0xf6, 0xa3, 0x04, 0xe3, 0xeb, 0xcc, 0x5e, 0xc3, 0x25, 0x81, 0xbb, 0x87, 0xb1, 0xb5, 0xea, 0x05, - 0x5c, 0x2e, 0xbf, 0x09, 0xc3, 0xa4, 0x82, 0xa9, 0xe0, 0x25, 0xf5, 0xcb, 0x2b, 0x4c, 0xf1, 0xd2, - 0xad, 0xa0, 0x6a, 0xe0, 0x62, 0x3f, 0xe9, 0x8d, 0x94, 0xe5, 0xb1, 0x56, 0x55, 0x61, 0x55, 0x3d, - 0x03, 0x5a, 0x34, 0xdd, 0x50, 0xd1, 0xbf, 0x12, 0x28, 0xeb, 0xcc, 0x7e, 0x80, 0x6d, 0x64, 0xd6, - 0xee, 0x93, 0xea, 0x87, 0x15, 0xcb, 0xdb, 0x2f, 0x88, 0xa2, 0x32, 0x93, 0xef, 0x40, 0x12, 0xed, - 0xf2, 0x22, 0xa1, 0x0e, 0xaf, 0x05, 0xa2, 0xba, 0xaf, 0x50, 0x13, 0x2a, 0x8f, 0xc2, 0x20, 0x77, - 0x78, 0x29, 0x50, 0x62, 0xf8, 0x03, 0x39, 0x03, 0x29, 0x0b, 0x33, 0x93, 0x3a, 0x15, 0xee, 0x10, - 0xd7, 0x5f, 0x71, 0xa3, 0x75, 0x4a, 0x96, 0x21, 0xb1, 0x83, 0x6b, 0x4c, 0x49, 0x64, 0xe2, 0x73, - 0x49, 0x43, 0x3c, 0xcb, 0xaf, 0xc3, 0x05, 0x7f, 0x31, 0x98, 0x32, 0x98, 0x91, 0xe6, 0x52, 0x4b, - 0x63, 0xd9, 0x13, 0xa7, 0x45, 0xd6, 0xe7, 0x9a, 0x4f, 0xec, 0xd7, 0xd3, 0x31, 0xa3, 0x81, 0x5d, - 0x56, 0x3d, 0x43, 0xbe, 0xf3, 0x4d, 0x91, 0x3c, 0x53, 0x9a, 0xf4, 0x74, 0x1d, 0x32, 0xdd, 0x24, - 0x87, 0xbe, 0x3c, 0x93, 0x40, 0x5e, 0x67, 0xf6, 0xcb, 0x76, 0xe4, 0x2e, 0x24, 0x2a, 0x25, 0xe4, - 0x8a, 0x9d, 0x9e, 0x5a, 0xd2, 0xa2, 0xa4, 0x07, 0xfc, 0x4a, 0xc8, 0x0d, 0x3c, 0x10, 0x19, 0x3d, - 0x0d, 0x98, 0x06, 0xb5, 0x53, 0x5b, 0x28, 0xbd, 0x3e, 0x08, 0x23, 0x7e, 0x78, 0xc5, 0xb2, 0xd6, - 0xb0, 0x4b, 0x5e, 0x82, 0xee, 0x71, 0x18, 0x2a, 0x62, 0xc7, 0x2e, 0x72, 0xa1, 0x3c, 0x6e, 0x04, - 0x23, 0xf9, 0x1e, 0x80, 0xe5, 0x31, 0x2a, 0x94, 0x1c, 0xc6, 0x95, 0xc1, 0x4c, 0x7c, 0x2e, 0xb5, - 0x34, 0xda, 0xe6, 0x8a, 0xa0, 0x9c, 0x7f, 0xcd, 0xf3, 0xe2, 0xf1, 0xf3, 0x74, 0x52, 0x0c, 0x1f, - 0x38, 0x8c, 0x1b, 0x49, 0xab, 0xf1, 0x28, 0x4f, 0x43, 0xb2, 0x8c, 0x5c, 0xf1, 0x4a, 0xd5, 0x94, - 0xa1, 0x8c, 0x34, 0x37, 0x6c, 0x34, 0x27, 0xe4, 0x8f, 0x21, 0x45, 0xf1, 0x43, 0x44, 0xad, 0xc2, - 0x16, 0x72, 0x2d, 0xe5, 0x82, 0xd0, 0xfb, 0xc6, 0x7e, 0x3d, 0x2d, 0x3d, 0xab, 0xa7, 0xa7, 0x7c, - 0xcd, 0xcc, 0xda, 0xc9, 0x3a, 0x24, 0x57, 0x46, 0xbc, 0x98, 0xf5, 0xb7, 0xd2, 0x1a, 0x36, 0x9b, - 0x07, 0x9f, 0x77, 0xdc, 0x16, 0x78, 0x91, 0x62, 0x56, 0x24, 0x25, 0x4b, 0x37, 0xc0, 0x2f, 0x98, - 0x47, 0xae, 0x25, 0xff, 0x20, 0xc1, 0x84, 0xb9, 0x4b, 0x29, 0x76, 0xcd, 0x5a, 0xa1, 0x82, 0x1c, - 0xea, 0x7d, 0xd0, 0xaa, 0x8e, 0x85, 0x29, 0x53, 0x86, 0x85, 0xa4, 0xd9, 0x36, 0x49, 0xab, 0x01, - 0x7a, 0x03, 0x39, 0x74, 0xa3, 0x81, 0xcd, 0xaf, 0x7a, 0x12, 0x8f, 0xeb, 0x69, 0xcd, 0x6f, 0xd9, - 0xa5, 0xa4, 0xfe, 0xf8, 0x79, 0x7a, 0x32, 0xb2, 0x80, 0x30, 0x65, 0xcc, 0x8c, 0x0a, 0xc9, 0x3f, - 0x4b, 0x70, 0x39, 0x2c, 0x68, 0xe1, 0xaa, 0x83, 0xbc, 0x75, 0x69, 0x2a, 0x62, 0x4a, 0x52, 0x30, - 0x9d, 0xef, 0xc2, 0x74, 0xad, 0x91, 0xf2, 0x41, 0x23, 0x23, 0xff, 0x5e, 0x40, 0x77, 0xb6, 0x8d, - 0x6e, 0x54, 0x75, 0x8f, 0xb4, 0xd6, 0xbd, 0x96, 0x60, 0x3e, 0x65, 0x76, 0x8d, 0xf7, 0x7e, 0xff, - 0x27, 0x61, 0xa2, 0x6d, 0x7f, 0x87, 0x7b, 0xff, 0xef, 0x01, 0x98, 0xf1, 0x63, 0x06, 0x2e, 0x93, - 0x2a, 0x8e, 0xf4, 0xed, 0xdc, 0xbc, 0x0d, 0xbd, 0x36, 0xd2, 0xe0, 0xf9, 0xd8, 0x48, 0x3d, 0x17, - 0xe2, 0x26, 0xcc, 0x9f, 0x6a, 0x76, 0xb8, 0x34, 0xff, 0x48, 0xe2, 0x7e, 0xd3, 0x81, 0x8e, 0x58, - 0xfd, 0x73, 0xb3, 0x40, 0x1a, 0x40, 0xe0, 0x8a, 0x83, 0xfd, 0x25, 0x49, 0x1a, 0x2d, 0x33, 0x3d, - 0xcd, 0x59, 0x84, 0x5c, 0x9f, 0x72, 0x43, 0x8b, 0x7e, 0x91, 0x60, 0xca, 0xcf, 0x59, 0x45, 0xae, - 0x89, 0x4b, 0x2d, 0xc7, 0xbb, 0xf7, 0x7d, 0x38, 0x2f, 0xb6, 0xf4, 0x94, 0x7d, 0x15, 0xae, 0xf4, - 0x90, 0xd0, 0x90, 0xba, 0x74, 0x30, 0x0c, 0xf1, 0x75, 0x66, 0xcb, 0x5f, 0x4a, 0x30, 0xdd, 0xf3, - 0x0a, 0x9f, 0x6d, 0x7b, 0x03, 0x4e, 0xb9, 0x22, 0xab, 0x77, 0xce, 0x86, 0x6f, 0x10, 0x92, 0x3f, - 0x87, 0xc9, 0xee, 0xd7, 0xe9, 0x9b, 0x7d, 0x16, 0xf5, 0xc0, 0xea, 0xed, 0x33, 0x80, 0xc3, 0xf6, - 0x3b, 0x70, 0x29, 0xea, 0x56, 0x7a, 0xb5, 0xb3, 0x56, 0x04, 0x4c, 0x5d, 0xe8, 0x0b, 0x16, 0x36, - 0xfb, 0x14, 0xc6, 0xa2, 0x2f, 0x8c, 0xd7, 0x3b, 0xeb, 0x44, 0x02, 0xd5, 0x5c, 0x9f, 0xc0, 0xb0, - 0x65, 0x01, 0x46, 0xda, 0x9b, 0xcd, 0x74, 0xd6, 0x68, 0x6f, 0x33, 0x7f, 0x2a, 0x24, 0x6c, 0xb0, - 0x09, 0xaf, 0x9c, 0xb8, 0xf1, 0x68, 0x91, 0xa9, 0x61, 0x5c, 0xbd, 0xd6, 0x3b, 0x1e, 0xd6, 0xfd, - 0x5a, 0x02, 0xed, 0x94, 0xcf, 0xc9, 0xad, 0xc8, 0x52, 0x3d, 0x32, 0xd4, 0xbb, 0x67, 0xcd, 0x08, - 0xe9, 0x7c, 0x2f, 0xc1, 0x6c, 0x7f, 0x47, 0x68, 0x1f, 0x2d, 0x22, 0xf2, 0xd4, 0xb7, 0x5e, 0x2c, - 0x2f, 0x24, 0xf8, 0x19, 0x28, 0x5d, 0xcf, 0xaf, 0x1b, 0x91, 0xb5, 0x23, 0xb1, 0xea, 0x52, 0xff, - 0xd8, 0x46, 0xef, 0xfc, 0xfd, 0xfd, 0x3f, 0xb4, 0xd8, 0xfe, 0xa1, 0x26, 0x3d, 0x3d, 0xd4, 0xa4, - 0xdf, 0x0f, 0x35, 0xe9, 0xdb, 0x23, 0x2d, 0xf6, 0xf4, 0x48, 0x8b, 0xfd, 0x76, 0xa4, 0xc5, 0x3e, - 0x9a, 0xb7, 0x1d, 0x5e, 0xdc, 0xdd, 0xca, 0x9a, 0xa4, 0x9c, 0x23, 0xdb, 0x64, 0xc1, 0xc5, 0xfc, - 0x21, 0xa1, 0x3b, 0xde, 0x73, 0x6e, 0xaf, 0xf1, 0x97, 0x81, 0xd7, 0x2a, 0x98, 0x6d, 0x0d, 0x89, - 0x5f, 0x0c, 0xb7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xe8, 0x89, 0x05, 0xf1, 0x10, 0x00, - 0x00, +var xxx_messageInfo_MsgAddPriceFeedersResponse proto.InternalMessageInfo + +// MsgRemovePriceFeeders represents a message to remove elys price feeders. +type MsgRemovePriceFeeders struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Feeders []string `protobuf:"bytes,2,rep,name=feeders,proto3" json:"feeders,omitempty"` } -func (this *MsgLegacyGovUpdateParams) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *MsgRemovePriceFeeders) Reset() { *m = MsgRemovePriceFeeders{} } +func (m *MsgRemovePriceFeeders) String() string { return proto.CompactTextString(m) } +func (*MsgRemovePriceFeeders) ProtoMessage() {} +func (*MsgRemovePriceFeeders) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{19} +} +func (m *MsgRemovePriceFeeders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemovePriceFeeders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemovePriceFeeders.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 *MsgRemovePriceFeeders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemovePriceFeeders.Merge(m, src) +} +func (m *MsgRemovePriceFeeders) XXX_Size() int { + return m.Size() +} +func (m *MsgRemovePriceFeeders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemovePriceFeeders.DiscardUnknown(m) +} - that1, ok := that.(*MsgLegacyGovUpdateParams) - if !ok { - that2, ok := that.(MsgLegacyGovUpdateParams) - if ok { - that1 = &that2 - } else { - return false +var xxx_messageInfo_MsgRemovePriceFeeders proto.InternalMessageInfo + +// MsgRemovePriceFeedersResponse defines the Msg/RemovePriceFeeders response +// type. +type MsgRemovePriceFeedersResponse struct { +} + +func (m *MsgRemovePriceFeedersResponse) Reset() { *m = MsgRemovePriceFeedersResponse{} } +func (m *MsgRemovePriceFeedersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemovePriceFeedersResponse) ProtoMessage() {} +func (*MsgRemovePriceFeedersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{20} +} +func (m *MsgRemovePriceFeedersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemovePriceFeedersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemovePriceFeedersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - 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 +} +func (m *MsgRemovePriceFeedersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemovePriceFeedersResponse.Merge(m, src) +} +func (m *MsgRemovePriceFeedersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemovePriceFeedersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemovePriceFeedersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemovePriceFeedersResponse proto.InternalMessageInfo + +// MsgCreateAssetInfo represents a message to create elys asset info. +type MsgCreateAssetInfo struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Display string `protobuf:"bytes,3,opt,name=display,proto3" json:"display,omitempty"` + Ticker string `protobuf:"bytes,4,opt,name=ticker,proto3" json:"ticker,omitempty"` + Decimal uint64 `protobuf:"varint,5,opt,name=decimal,proto3" json:"decimal,omitempty"` +} + +func (m *MsgCreateAssetInfo) Reset() { *m = MsgCreateAssetInfo{} } +func (m *MsgCreateAssetInfo) String() string { return proto.CompactTextString(m) } +func (*MsgCreateAssetInfo) ProtoMessage() {} +func (*MsgCreateAssetInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{21} +} +func (m *MsgCreateAssetInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateAssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateAssetInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if !this.Changes.Equal(&that1.Changes) { - return false - } - return true } -func (this *MsgGovUpdateParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } +func (m *MsgCreateAssetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateAssetInfo.Merge(m, src) +} +func (m *MsgCreateAssetInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateAssetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateAssetInfo.DiscardUnknown(m) +} - that1, ok := that.(*MsgGovUpdateParams) - if !ok { - that2, ok := that.(MsgGovUpdateParams) - if ok { - that1 = &that2 - } else { - return false +var xxx_messageInfo_MsgCreateAssetInfo proto.InternalMessageInfo + +// MsgCreateAssetInfoResponse defines the Msg/CreateAssetInfo response +// type. +type MsgCreateAssetInfoResponse struct { +} + +func (m *MsgCreateAssetInfoResponse) Reset() { *m = MsgCreateAssetInfoResponse{} } +func (m *MsgCreateAssetInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateAssetInfoResponse) ProtoMessage() {} +func (*MsgCreateAssetInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{22} +} +func (m *MsgCreateAssetInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateAssetInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateAssetInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - 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 - } +func (m *MsgCreateAssetInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateAssetInfoResponse.Merge(m, src) +} +func (m *MsgCreateAssetInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateAssetInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateAssetInfoResponse.DiscardUnknown(m) +} - that1, ok := that.(*MsgGovAddDenoms) - if !ok { - that2, ok := that.(MsgGovAddDenoms) - if ok { - that1 = &that2 - } else { - return false +var xxx_messageInfo_MsgCreateAssetInfoResponse 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_58d45810177a43e8, []int{23} +} +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 } - 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 +} +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_58d45810177a43e8, []int{24} +} +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 } - 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 (m *MsgLegacyGovUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.Merge(m, src) } -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 (m *MsgLegacyGovUpdateParamsResponse) XXX_Size() int { + return m.Size() } -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 +func (m *MsgLegacyGovUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.DiscardUnknown(m) } -// 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 +var xxx_messageInfo_MsgLegacyGovUpdateParamsResponse proto.InternalMessageInfo -// 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) +// 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"` } -type msgClient struct { - cc grpc1.ClientConn +func (m *MsgGovUpdateParams) Reset() { *m = MsgGovUpdateParams{} } +func (*MsgGovUpdateParams) ProtoMessage() {} +func (*MsgGovUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{25} } - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} +func (m *MsgGovUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *msgClient) AggregateExchangeRatePrevote(ctx context.Context, in *MsgAggregateExchangeRatePrevote, opts ...grpc.CallOption) (*MsgAggregateExchangeRatePrevoteResponse, error) { - out := new(MsgAggregateExchangeRatePrevoteResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/AggregateExchangeRatePrevote", in, out, opts...) - if err != nil { - return nil, err +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 } - 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, "/ojo.oracle.v1.Msg/AggregateExchangeRateVote", in, out, opts...) - if err != nil { - return nil, err - } - return out, 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) } -func (c *msgClient) DelegateFeedConsent(ctx context.Context, in *MsgDelegateFeedConsent, opts ...grpc.CallOption) (*MsgDelegateFeedConsentResponse, error) { - out := new(MsgDelegateFeedConsentResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/DelegateFeedConsent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_MsgGovUpdateParams proto.InternalMessageInfo + +// MsgGovUpdateParamsResponse defines the Msg/GovUpdateParams response type. +type MsgGovUpdateParamsResponse struct { } -func (c *msgClient) LegacyGovUpdateParams(ctx context.Context, in *MsgLegacyGovUpdateParams, opts ...grpc.CallOption) (*MsgLegacyGovUpdateParamsResponse, error) { - out := new(MsgLegacyGovUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/LegacyGovUpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +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_58d45810177a43e8, []int{26} } - -func (c *msgClient) GovUpdateParams(ctx context.Context, in *MsgGovUpdateParams, opts ...grpc.CallOption) (*MsgGovUpdateParamsResponse, error) { - out := new(MsgGovUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovUpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *MsgGovUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *msgClient) GovAddDenoms(ctx context.Context, in *MsgGovAddDenoms, opts ...grpc.CallOption) (*MsgGovAddDenomsResponse, error) { - out := new(MsgGovAddDenomsResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovAddDenoms", in, out, opts...) - if err != nil { - return nil, err +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 } - 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, "/ojo.oracle.v1.Msg/GovRemoveCurrencyPairProviders", in, out, opts...) - if err != nil { - return nil, err - } - return out, 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) } -func (c *msgClient) GovRemoveCurrencyDeviationThresholds(ctx context.Context, in *MsgGovRemoveCurrencyDeviationThresholds, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { - out := new(MsgGovRemoveCurrencyDeviationThresholdsResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovRemoveCurrencyDeviationThresholds", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +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 (c *msgClient) GovCancelUpdateParamPlan(ctx context.Context, in *MsgGovCancelUpdateParamPlan, opts ...grpc.CallOption) (*MsgGovCancelUpdateParamPlanResponse, error) { - out := new(MsgGovCancelUpdateParamPlanResponse) - err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovCancelUpdateParamPlan", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgGovAddDenoms) Reset() { *m = MsgGovAddDenoms{} } +func (*MsgGovAddDenoms) ProtoMessage() {} +func (*MsgGovAddDenoms) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{27} +} +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 } - 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) +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) } -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { +var xxx_messageInfo_MsgGovAddDenoms proto.InternalMessageInfo + +// MsgGovAddDenomResponse defines the Msg/GovAddDenomResponse response type. +type MsgGovAddDenomsResponse struct { } -func (*UnimplementedMsgServer) AggregateExchangeRatePrevote(ctx context.Context, req *MsgAggregateExchangeRatePrevote) (*MsgAggregateExchangeRatePrevoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AggregateExchangeRatePrevote not implemented") +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_58d45810177a43e8, []int{28} } -func (*UnimplementedMsgServer) AggregateExchangeRateVote(ctx context.Context, req *MsgAggregateExchangeRateVote) (*MsgAggregateExchangeRateVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AggregateExchangeRateVote not implemented") +func (m *MsgGovAddDenomsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedMsgServer) DelegateFeedConsent(ctx context.Context, req *MsgDelegateFeedConsent) (*MsgDelegateFeedConsentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateFeedConsent not implemented") +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 (*UnimplementedMsgServer) LegacyGovUpdateParams(ctx context.Context, req *MsgLegacyGovUpdateParams) (*MsgLegacyGovUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LegacyGovUpdateParams not implemented") +func (m *MsgGovAddDenomsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovAddDenomsResponse.Merge(m, src) } -func (*UnimplementedMsgServer) GovUpdateParams(ctx context.Context, req *MsgGovUpdateParams) (*MsgGovUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GovUpdateParams not implemented") +func (m *MsgGovAddDenomsResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedMsgServer) GovAddDenoms(ctx context.Context, req *MsgGovAddDenoms) (*MsgGovAddDenomsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GovAddDenoms not implemented") +func (m *MsgGovAddDenomsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovAddDenomsResponse.DiscardUnknown(m) } -func (*UnimplementedMsgServer) GovRemoveCurrencyPairProviders(ctx context.Context, req *MsgGovRemoveCurrencyPairProviders) (*MsgGovRemoveCurrencyPairProvidersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GovRemoveCurrencyPairProviders not implemented") + +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 (*UnimplementedMsgServer) GovRemoveCurrencyDeviationThresholds(ctx context.Context, req *MsgGovRemoveCurrencyDeviationThresholds) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GovRemoveCurrencyDeviationThresholds not implemented") + +func (m *MsgGovRemoveCurrencyPairProviders) Reset() { *m = MsgGovRemoveCurrencyPairProviders{} } +func (*MsgGovRemoveCurrencyPairProviders) ProtoMessage() {} +func (*MsgGovRemoveCurrencyPairProviders) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{29} } -func (*UnimplementedMsgServer) GovCancelUpdateParamPlan(ctx context.Context, req *MsgGovCancelUpdateParamPlan) (*MsgGovCancelUpdateParamPlanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GovCancelUpdateParamPlan not implemented") +func (m *MsgGovRemoveCurrencyPairProviders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) +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) } -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: "/ojo.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) +var xxx_messageInfo_MsgGovRemoveCurrencyPairProviders proto.InternalMessageInfo + +// MsgGovRemoveCurrencyPairProvidersResponse defines the Msg/GovRemoveCurrencyPairProvidersResponse response type. +type MsgGovRemoveCurrencyPairProvidersResponse struct { } -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: "/ojo.oracle.v1.Msg/AggregateExchangeRateVote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AggregateExchangeRateVote(ctx, req.(*MsgAggregateExchangeRateVote)) +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_58d45810177a43e8, []int{30} +} +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 } - return interceptor(ctx, in, info, handler) +} +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) } -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: "/ojo.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) +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 _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: "/ojo.oracle.v1.Msg/LegacyGovUpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).LegacyGovUpdateParams(ctx, req.(*MsgLegacyGovUpdateParams)) +func (m *MsgGovRemoveCurrencyDeviationThresholds) Reset() { + *m = MsgGovRemoveCurrencyDeviationThresholds{} +} +func (*MsgGovRemoveCurrencyDeviationThresholds) ProtoMessage() {} +func (*MsgGovRemoveCurrencyDeviationThresholds) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{31} +} +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 } - return interceptor(ctx, in, info, handler) +} +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) } -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: "/ojo.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) +var xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds proto.InternalMessageInfo + +// MsgGovRemoveCurrencyDeviationThresholdsResponse defines the Msg/GovRemoveCurrencyDeviationThresholdsResponse response type. +type MsgGovRemoveCurrencyDeviationThresholdsResponse struct { } -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: "/ojo.oracle.v1.Msg/GovAddDenoms", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GovAddDenoms(ctx, req.(*MsgGovAddDenoms)) +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_58d45810177a43e8, []int{32} +} +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 } - return interceptor(ctx, in, info, handler) +} +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) } -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: "/ojo.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) +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 _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: "/ojo.oracle.v1.Msg/GovRemoveCurrencyDeviationThresholds", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GovRemoveCurrencyDeviationThresholds(ctx, req.(*MsgGovRemoveCurrencyDeviationThresholds)) +func (m *MsgGovCancelUpdateParamPlan) Reset() { *m = MsgGovCancelUpdateParamPlan{} } +func (*MsgGovCancelUpdateParamPlan) ProtoMessage() {} +func (*MsgGovCancelUpdateParamPlan) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{33} +} +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 } - return interceptor(ctx, in, info, handler) +} +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) } -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: "/ojo.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 xxx_messageInfo_MsgGovCancelUpdateParamPlan proto.InternalMessageInfo -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ojo.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: "ojo/oracle/v1/tx.proto", +// MsgGovCancelUpdateParamPlanResponse defines the Msg/GovCancelUpdateParamPlanResponse response type. +type MsgGovCancelUpdateParamPlanResponse struct { } -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 *MsgGovCancelUpdateParamPlanResponse) Reset() { *m = MsgGovCancelUpdateParamPlanResponse{} } +func (m *MsgGovCancelUpdateParamPlanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovCancelUpdateParamPlanResponse) ProtoMessage() {} +func (*MsgGovCancelUpdateParamPlanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{34} } - -func (m *MsgAggregateExchangeRatePrevote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -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 +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 } - 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 *MsgGovCancelUpdateParamPlanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.Merge(m, src) } - -func (m *MsgAggregateExchangeRatePrevoteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Size() int { + return m.Size() } - -func (m *MsgAggregateExchangeRatePrevoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.DiscardUnknown(m) } -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 +var xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgAggregateExchangeRatePrevote)(nil), "ojo.oracle.v1.MsgAggregateExchangeRatePrevote") + proto.RegisterType((*MsgAggregateExchangeRatePrevoteResponse)(nil), "ojo.oracle.v1.MsgAggregateExchangeRatePrevoteResponse") + proto.RegisterType((*MsgAggregateExchangeRateVote)(nil), "ojo.oracle.v1.MsgAggregateExchangeRateVote") + proto.RegisterType((*MsgAggregateExchangeRateVoteResponse)(nil), "ojo.oracle.v1.MsgAggregateExchangeRateVoteResponse") + proto.RegisterType((*MsgDelegateFeedConsent)(nil), "ojo.oracle.v1.MsgDelegateFeedConsent") + proto.RegisterType((*MsgDelegateFeedConsentResponse)(nil), "ojo.oracle.v1.MsgDelegateFeedConsentResponse") + proto.RegisterType((*FeedPrice)(nil), "ojo.oracle.v1.FeedPrice") + proto.RegisterType((*MsgFeedPrice)(nil), "ojo.oracle.v1.MsgFeedPrice") + proto.RegisterType((*MsgFeedPriceResponse)(nil), "ojo.oracle.v1.MsgFeedPriceResponse") + proto.RegisterType((*MsgSetPriceFeeder)(nil), "ojo.oracle.v1.MsgSetPriceFeeder") + proto.RegisterType((*MsgSetPriceFeederResponse)(nil), "ojo.oracle.v1.MsgSetPriceFeederResponse") + proto.RegisterType((*MsgDeletePriceFeeder)(nil), "ojo.oracle.v1.MsgDeletePriceFeeder") + proto.RegisterType((*MsgDeletePriceFeederResponse)(nil), "ojo.oracle.v1.MsgDeletePriceFeederResponse") + proto.RegisterType((*MsgFeedMultiplePrices)(nil), "ojo.oracle.v1.MsgFeedMultiplePrices") + proto.RegisterType((*MsgFeedMultiplePricesResponse)(nil), "ojo.oracle.v1.MsgFeedMultiplePricesResponse") + proto.RegisterType((*MsgRemoveAssetInfo)(nil), "ojo.oracle.v1.MsgRemoveAssetInfo") + proto.RegisterType((*MsgRemoveAssetInfoResponse)(nil), "ojo.oracle.v1.MsgRemoveAssetInfoResponse") + proto.RegisterType((*MsgAddPriceFeeders)(nil), "ojo.oracle.v1.MsgAddPriceFeeders") + proto.RegisterType((*MsgAddPriceFeedersResponse)(nil), "ojo.oracle.v1.MsgAddPriceFeedersResponse") + proto.RegisterType((*MsgRemovePriceFeeders)(nil), "ojo.oracle.v1.MsgRemovePriceFeeders") + proto.RegisterType((*MsgRemovePriceFeedersResponse)(nil), "ojo.oracle.v1.MsgRemovePriceFeedersResponse") + proto.RegisterType((*MsgCreateAssetInfo)(nil), "ojo.oracle.v1.MsgCreateAssetInfo") + proto.RegisterType((*MsgCreateAssetInfoResponse)(nil), "ojo.oracle.v1.MsgCreateAssetInfoResponse") + proto.RegisterType((*MsgLegacyGovUpdateParams)(nil), "ojo.oracle.v1.MsgLegacyGovUpdateParams") + proto.RegisterType((*MsgLegacyGovUpdateParamsResponse)(nil), "ojo.oracle.v1.MsgLegacyGovUpdateParamsResponse") + proto.RegisterType((*MsgGovUpdateParams)(nil), "ojo.oracle.v1.MsgGovUpdateParams") + proto.RegisterType((*MsgGovUpdateParamsResponse)(nil), "ojo.oracle.v1.MsgGovUpdateParamsResponse") + proto.RegisterType((*MsgGovAddDenoms)(nil), "ojo.oracle.v1.MsgGovAddDenoms") + proto.RegisterType((*MsgGovAddDenomsResponse)(nil), "ojo.oracle.v1.MsgGovAddDenomsResponse") + proto.RegisterType((*MsgGovRemoveCurrencyPairProviders)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyPairProviders") + proto.RegisterType((*MsgGovRemoveCurrencyPairProvidersResponse)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse") + proto.RegisterType((*MsgGovRemoveCurrencyDeviationThresholds)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyDeviationThresholds") + proto.RegisterType((*MsgGovRemoveCurrencyDeviationThresholdsResponse)(nil), "ojo.oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse") + proto.RegisterType((*MsgGovCancelUpdateParamPlan)(nil), "ojo.oracle.v1.MsgGovCancelUpdateParamPlan") + proto.RegisterType((*MsgGovCancelUpdateParamPlanResponse)(nil), "ojo.oracle.v1.MsgGovCancelUpdateParamPlanResponse") } -func (m *MsgAggregateExchangeRateVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func init() { proto.RegisterFile("ojo/oracle/v1/tx.proto", fileDescriptor_58d45810177a43e8) } + +var fileDescriptor_58d45810177a43e8 = []byte{ + // 1656 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcb, 0x6f, 0xd4, 0xd6, + 0x1a, 0x8f, 0xc9, 0x73, 0xbe, 0x81, 0x20, 0x4c, 0x12, 0x26, 0x4e, 0xf0, 0x04, 0x27, 0x3c, 0x02, + 0x64, 0x86, 0x84, 0x7b, 0x11, 0x1a, 0x5d, 0x2e, 0x37, 0x8f, 0x0b, 0xba, 0x12, 0x73, 0x15, 0x99, + 0x0b, 0x8b, 0xab, 0x56, 0x23, 0x63, 0x1f, 0x3c, 0x4e, 0x3c, 0xf6, 0xd4, 0xc7, 0x19, 0x98, 0x4a, + 0x95, 0xaa, 0x2e, 0xaa, 0x2e, 0x5a, 0xa9, 0xea, 0xaa, 0xea, 0xa2, 0xa2, 0x5b, 0xa4, 0x4a, 0x2c, + 0x58, 0x74, 0xd3, 0x45, 0x77, 0x59, 0x55, 0x88, 0x55, 0xc5, 0x22, 0xb4, 0x50, 0x89, 0x4a, 0x55, + 0x17, 0xe5, 0x2f, 0xa8, 0xce, 0x39, 0xf6, 0x19, 0x8f, 0xc7, 0xf3, 0x20, 0x54, 0x34, 0xbb, 0x39, + 0xe7, 0xfb, 0x7d, 0xdf, 0xf7, 0xfb, 0x1e, 0xe7, 0xe5, 0x81, 0x09, 0x77, 0xc3, 0xcd, 0xbb, 0x9e, + 0xa6, 0xdb, 0x28, 0x5f, 0x5b, 0xcc, 0xfb, 0x77, 0x73, 0x55, 0xcf, 0xf5, 0x5d, 0xf1, 0x80, 0xbb, + 0xe1, 0xe6, 0xd8, 0x7c, 0xae, 0xb6, 0x28, 0x1d, 0xd1, 0x5d, 0x5c, 0x71, 0x71, 0xbe, 0x82, 0x4d, + 0x02, 0xab, 0x60, 0x93, 0xe1, 0xa4, 0x49, 0x26, 0x28, 0xd1, 0x51, 0x9e, 0x0d, 0x02, 0xd1, 0x98, + 0xe9, 0x9a, 0x2e, 0x9b, 0x27, 0xbf, 0x82, 0x59, 0xa9, 0xd9, 0x61, 0xe0, 0x82, 0xca, 0x94, 0xef, + 0x05, 0xc8, 0x16, 0xb1, 0xb9, 0x6c, 0x9a, 0x1e, 0x32, 0x35, 0x1f, 0xfd, 0xfb, 0xae, 0x5e, 0xd6, + 0x1c, 0x13, 0xa9, 0x9a, 0x8f, 0xd6, 0x3d, 0x54, 0x73, 0x7d, 0x24, 0xce, 0xc2, 0x40, 0x59, 0xc3, + 0xe5, 0x8c, 0x30, 0x23, 0x9c, 0x4a, 0xad, 0x1c, 0x7c, 0xb9, 0x93, 0x4d, 0xd7, 0xb5, 0x8a, 0x5d, + 0x50, 0xc8, 0xac, 0xa2, 0x52, 0xa1, 0x78, 0x0e, 0x86, 0x6e, 0x23, 0x64, 0x20, 0x2f, 0xb3, 0x8f, + 0xc2, 0x32, 0x8f, 0x1f, 0x2e, 0x8c, 0x05, 0xe4, 0x96, 0x0d, 0xc3, 0x43, 0x18, 0x5f, 0xf7, 0x3d, + 0xcb, 0x31, 0xd5, 0x00, 0x27, 0x5e, 0x86, 0x54, 0x4d, 0xb3, 0x2d, 0x43, 0xf3, 0x5d, 0x2f, 0xd3, + 0x4f, 0x95, 0x8e, 0x3d, 0x7e, 0xb8, 0x70, 0x34, 0x50, 0xba, 0x19, 0xca, 0x9a, 0xb5, 0x1b, 0x3a, + 0x85, 0xc3, 0x1f, 0xdd, 0xcb, 0xf6, 0xfd, 0x72, 0x2f, 0xdb, 0xf7, 0xc1, 0x8b, 0x07, 0xa7, 0x03, + 0xab, 0xca, 0x3c, 0x9c, 0xec, 0x12, 0x8f, 0x8a, 0x70, 0xd5, 0x75, 0x30, 0x52, 0x3e, 0xd9, 0x07, + 0xd3, 0xed, 0xb0, 0x37, 0x83, 0xc0, 0xb1, 0x66, 0xfb, 0xad, 0x81, 0x93, 0x59, 0x45, 0xa5, 0x42, + 0xf1, 0x5f, 0x30, 0x8a, 0x02, 0xc5, 0x92, 0xa7, 0xf9, 0x08, 0x07, 0x09, 0x98, 0x7c, 0xb9, 0x93, + 0x1d, 0x67, 0xf0, 0x66, 0xb9, 0xa2, 0x1e, 0x40, 0x11, 0x4f, 0x38, 0x92, 0xba, 0xfe, 0xdd, 0xa4, + 0x6e, 0xe0, 0xcf, 0x4a, 0xdd, 0x09, 0x98, 0xeb, 0x94, 0x0e, 0x9e, 0xb7, 0xaf, 0x05, 0x98, 0x28, + 0x62, 0x73, 0x0d, 0xd9, 0x14, 0x77, 0x05, 0x21, 0x63, 0x95, 0x08, 0x1c, 0x5f, 0xbc, 0x04, 0x23, + 0x6e, 0x15, 0x79, 0x94, 0x97, 0xd0, 0x2b, 0x2f, 0xae, 0x42, 0xd4, 0x8d, 0xc0, 0x6a, 0x90, 0xc5, + 0x5e, 0xd4, 0x43, 0x95, 0xc2, 0x78, 0x34, 0x2a, 0x6e, 0x55, 0x99, 0x01, 0x39, 0x99, 0x2e, 0x8f, + 0x68, 0x03, 0x52, 0x64, 0x7a, 0xdd, 0xb3, 0x74, 0x24, 0x8e, 0xc1, 0xa0, 0x86, 0x31, 0x0a, 0xca, + 0xae, 0xb2, 0x81, 0x78, 0x15, 0x06, 0xab, 0x44, 0x1c, 0xf0, 0x5a, 0xdc, 0xde, 0xc9, 0xf6, 0x3d, + 0xd9, 0xc9, 0x4e, 0x31, 0x6e, 0xd8, 0xd8, 0xcc, 0x59, 0x6e, 0xbe, 0xa2, 0xf9, 0xe5, 0xdc, 0x35, + 0x64, 0x6a, 0x7a, 0x7d, 0x0d, 0xe9, 0x8f, 0x1f, 0x2e, 0x40, 0x40, 0x7d, 0x0d, 0xe9, 0x2a, 0xd3, + 0x57, 0x3e, 0x13, 0x60, 0x7f, 0x11, 0x9b, 0x0d, 0x7f, 0x7f, 0x83, 0x91, 0xaa, 0xe7, 0xd6, 0x2c, + 0xd2, 0x00, 0x42, 0x97, 0x06, 0xe0, 0x48, 0xf1, 0x12, 0x00, 0x29, 0x5b, 0xa9, 0x41, 0x2a, 0xbd, + 0x94, 0xc9, 0x35, 0x6d, 0x21, 0x39, 0xee, 0x63, 0x65, 0x80, 0xd0, 0x55, 0x53, 0xb7, 0xc3, 0x89, + 0xc2, 0x01, 0x9a, 0xa2, 0xd0, 0x9a, 0x32, 0x01, 0x63, 0x51, 0x4e, 0x3c, 0x31, 0x2e, 0x1c, 0x2a, + 0x62, 0xf3, 0x3a, 0xf2, 0xe9, 0xf4, 0x15, 0xd6, 0x7d, 0x8d, 0x7e, 0x15, 0x7a, 0xec, 0xd7, 0x29, + 0x48, 0x59, 0xb8, 0xa4, 0xe9, 0xbe, 0x55, 0x63, 0x5c, 0x47, 0xd4, 0x11, 0x0b, 0x2f, 0xd3, 0x71, + 0x21, 0x1d, 0xed, 0xc1, 0x29, 0x98, 0x6c, 0x71, 0xc8, 0xd9, 0xdc, 0xa0, 0x2c, 0x49, 0x21, 0xc9, + 0x62, 0x7e, 0x0d, 0x42, 0xcd, 0x3e, 0x65, 0xba, 0x0d, 0xb4, 0x98, 0xe5, 0x6e, 0xbf, 0x10, 0x60, + 0x3c, 0xc8, 0x4e, 0x71, 0xcb, 0xf6, 0xad, 0xaa, 0xcd, 0x60, 0x58, 0x5c, 0x82, 0x61, 0xdd, 0x43, + 0x91, 0x6e, 0x6f, 0xef, 0x39, 0x04, 0x8a, 0x97, 0x21, 0xdd, 0x28, 0x1c, 0xd9, 0x2c, 0xfa, 0x7b, + 0xa8, 0x1c, 0xf0, 0xca, 0xe1, 0xc2, 0x7e, 0xc2, 0x3d, 0x34, 0xa7, 0x64, 0xe1, 0x68, 0x22, 0x37, + 0xce, 0xde, 0x03, 0xb1, 0x88, 0x4d, 0x15, 0x55, 0xdc, 0x1a, 0x5a, 0x26, 0xad, 0xfc, 0x1f, 0xe7, + 0xb6, 0x2b, 0x5e, 0x80, 0x94, 0xb6, 0xe5, 0x97, 0x5d, 0xcf, 0xf2, 0xeb, 0x5d, 0xb9, 0x37, 0xa0, + 0x64, 0x71, 0x18, 0xc8, 0x71, 0x2b, 0x6c, 0x19, 0xa8, 0x6c, 0x50, 0x18, 0x25, 0x94, 0x1a, 0x28, + 0x65, 0x1a, 0xa4, 0x56, 0x9f, 0x9c, 0x51, 0x8d, 0x32, 0x5a, 0x36, 0x8c, 0x48, 0xb2, 0xf1, 0xae, + 0x19, 0x65, 0x60, 0x98, 0xd5, 0x91, 0xe5, 0x32, 0xa5, 0x86, 0xc3, 0x36, 0xac, 0x62, 0x7e, 0x39, + 0xab, 0x3a, 0x2d, 0x32, 0xe3, 0xfc, 0x86, 0x89, 0xb1, 0x1a, 0xb6, 0xba, 0xe6, 0xdc, 0xbe, 0x11, + 0x68, 0xca, 0x56, 0x49, 0xcd, 0x23, 0x45, 0xdc, 0x4d, 0xfb, 0x25, 0x16, 0x90, 0x70, 0x35, 0x2c, + 0x5c, 0xb5, 0xb5, 0x3a, 0x3b, 0x83, 0xd4, 0x70, 0x28, 0x4e, 0xc0, 0x90, 0x6f, 0xe9, 0x9b, 0x28, + 0x38, 0x67, 0xd4, 0x60, 0x44, 0x35, 0x90, 0x6e, 0x55, 0x34, 0x3b, 0x33, 0x38, 0x23, 0x9c, 0x1a, + 0x50, 0xc3, 0x61, 0xac, 0x3f, 0x59, 0xd2, 0x63, 0xcc, 0x79, 0x60, 0xbf, 0x0b, 0x90, 0x29, 0x62, + 0x93, 0x6d, 0x99, 0x57, 0xdd, 0xda, 0x8d, 0xaa, 0x41, 0x0e, 0x6a, 0xcd, 0xd3, 0x2a, 0xf8, 0x75, + 0x7a, 0xd4, 0xb7, 0x7c, 0x1b, 0x85, 0x21, 0xd2, 0x81, 0x38, 0x03, 0x69, 0x03, 0x61, 0xdd, 0xb3, + 0xaa, 0xbe, 0xe5, 0x3a, 0x41, 0x98, 0xd1, 0x29, 0x51, 0x84, 0x81, 0x4d, 0x54, 0xc7, 0x99, 0x01, + 0x5a, 0x2d, 0xfa, 0x5b, 0xfc, 0x3b, 0x0c, 0xb3, 0x53, 0x10, 0xd3, 0x30, 0xd3, 0x4b, 0xe3, 0xb1, + 0x95, 0xca, 0xb8, 0x06, 0xcb, 0x34, 0xc4, 0x16, 0x24, 0x72, 0x12, 0x7d, 0xce, 0x4e, 0x23, 0x21, + 0x56, 0x6d, 0x05, 0x66, 0xda, 0x85, 0xcc, 0xf3, 0xf2, 0x84, 0x15, 0xfc, 0xaf, 0xce, 0xc8, 0x45, + 0x18, 0xa8, 0xda, 0x9a, 0x43, 0x4b, 0x9f, 0x5e, 0x92, 0x93, 0x42, 0x0f, 0xf8, 0xd9, 0x9a, 0x13, + 0xe4, 0x80, 0x6a, 0x74, 0x4c, 0x00, 0x6b, 0x89, 0x76, 0xa1, 0xef, 0x0c, 0xc2, 0x41, 0x26, 0x5e, + 0x36, 0x8c, 0x35, 0xd2, 0x9d, 0x6f, 0x3e, 0xee, 0x09, 0x18, 0x2a, 0x23, 0xcb, 0x2c, 0xfb, 0x34, + 0xf2, 0x7e, 0x35, 0x18, 0x89, 0x57, 0x00, 0xe8, 0x7a, 0x29, 0xd9, 0x16, 0xf6, 0x33, 0x83, 0x74, + 0xeb, 0x1e, 0x8b, 0x65, 0x85, 0x52, 0x5e, 0x39, 0x44, 0x72, 0x71, 0xff, 0x69, 0x36, 0x45, 0x87, + 0xd7, 0x2c, 0xec, 0xab, 0x29, 0x23, 0xfc, 0x29, 0x4e, 0x43, 0xaa, 0xa2, 0x39, 0xf4, 0x2e, 0x53, + 0xcf, 0x0c, 0xd1, 0xf3, 0xb0, 0x31, 0x21, 0xbe, 0x0d, 0x69, 0x0f, 0xdd, 0xd1, 0x3c, 0xa3, 0x74, + 0x4b, 0x73, 0x8c, 0xcc, 0x30, 0x8d, 0xf7, 0x1f, 0xdb, 0x3b, 0x59, 0xa1, 0xcb, 0x85, 0xa3, 0x71, + 0xe3, 0x24, 0xf7, 0xdc, 0x92, 0x5f, 0xf6, 0x10, 0x2e, 0xbb, 0xb6, 0xa1, 0xa8, 0xc0, 0x0c, 0xae, + 0x68, 0x8e, 0x21, 0x7e, 0x25, 0xc0, 0x11, 0x7d, 0xcb, 0xf3, 0x90, 0xa3, 0xd7, 0x4b, 0x55, 0xcd, + 0xf2, 0x4a, 0xe1, 0x35, 0x00, 0x67, 0x46, 0x68, 0x48, 0x73, 0xb1, 0x90, 0x56, 0x03, 0xf4, 0xba, + 0x66, 0x79, 0xeb, 0x21, 0x76, 0x65, 0x95, 0x84, 0xf8, 0x72, 0x27, 0x2b, 0x33, 0x97, 0x6d, 0x4c, + 0x2a, 0xf7, 0x9f, 0x66, 0x27, 0x13, 0x0d, 0xd0, 0xa4, 0x8c, 0xeb, 0x49, 0x22, 0xf1, 0x5b, 0x01, + 0x8e, 0x72, 0x83, 0x06, 0xaa, 0x59, 0x1a, 0xa9, 0x4b, 0x23, 0x22, 0x9c, 0x49, 0x51, 0xa6, 0xf3, + 0x6d, 0x98, 0xae, 0x85, 0x2a, 0xff, 0x0b, 0x35, 0x56, 0xfe, 0x1b, 0xd0, 0x9d, 0x8b, 0xd1, 0x4d, + 0xb2, 0x4e, 0x48, 0xcb, 0xed, 0x6d, 0x51, 0xe6, 0x53, 0x7a, 0x5b, 0x79, 0xe7, 0xf5, 0x3f, 0x09, + 0x47, 0x62, 0xfd, 0xcd, 0x7b, 0xff, 0xd7, 0x7d, 0x70, 0x8c, 0xc9, 0xd8, 0x61, 0x90, 0x98, 0xb7, + 0x3d, 0xb3, 0x1a, 0x3a, 0x35, 0xd2, 0xe0, 0xde, 0x68, 0xa4, 0x8e, 0x85, 0x38, 0x03, 0xf3, 0x5d, + 0x93, 0xcd, 0x4b, 0xf3, 0x9b, 0x40, 0x1f, 0x96, 0x2d, 0xe8, 0x84, 0xea, 0xef, 0x99, 0x02, 0xc9, + 0x00, 0x41, 0x56, 0x2c, 0xc4, 0x4a, 0x92, 0x52, 0x23, 0x33, 0x1d, 0x93, 0xb3, 0x08, 0xf9, 0x1e, + 0xc3, 0xe5, 0x29, 0xfa, 0x4e, 0x80, 0x29, 0xa6, 0xb3, 0xaa, 0x39, 0x3a, 0xb2, 0x23, 0xdb, 0x3b, + 0x39, 0x1f, 0xf6, 0x4a, 0x5a, 0x3a, 0x86, 0x7d, 0x1c, 0x66, 0x3b, 0x84, 0x10, 0x86, 0xba, 0xf4, + 0xf3, 0x28, 0xf4, 0x17, 0xb1, 0x29, 0x7e, 0x28, 0xc0, 0x74, 0xc7, 0x6f, 0x27, 0xb9, 0xd8, 0x0a, + 0xe8, 0xf2, 0x6d, 0x42, 0xba, 0xf0, 0x6a, 0xf8, 0x90, 0x90, 0xf8, 0x1e, 0x4c, 0xb6, 0xff, 0x8e, + 0x71, 0xa6, 0x47, 0xa3, 0x04, 0x2c, 0x9d, 0x7f, 0x05, 0x30, 0x77, 0xbf, 0x09, 0x87, 0x93, 0x3e, + 0x07, 0x1c, 0x6f, 0xb5, 0x95, 0x00, 0x93, 0x16, 0x7a, 0x82, 0x71, 0x67, 0xc5, 0xe8, 0x6b, 0x7d, + 0xaa, 0x55, 0x97, 0x0b, 0xa5, 0xd9, 0x0e, 0x42, 0x6e, 0xae, 0x0c, 0x62, 0xc2, 0xd3, 0x6e, 0x2e, + 0x59, 0xb5, 0x19, 0x25, 0x9d, 0xed, 0x05, 0xc5, 0x3d, 0xbd, 0x05, 0xa3, 0xb1, 0xa7, 0xf4, 0x4c, + 0xab, 0x7e, 0x33, 0x42, 0x3a, 0xd5, 0x0d, 0xc1, 0xad, 0x23, 0x38, 0xd4, 0xfa, 0x34, 0x9e, 0x4d, + 0x4e, 0x6d, 0x13, 0x48, 0x3a, 0xd3, 0x03, 0x88, 0xbb, 0x29, 0xc1, 0xc1, 0xf8, 0x63, 0xf2, 0x58, + 0xab, 0x7e, 0x0c, 0x22, 0xcd, 0x77, 0x85, 0x44, 0x1d, 0xc4, 0xdf, 0x86, 0x09, 0x0e, 0x62, 0x90, + 0x24, 0x07, 0x6d, 0x5e, 0x7a, 0xa4, 0xe0, 0x09, 0xcf, 0xbc, 0xb9, 0x76, 0x0c, 0x9b, 0xdc, 0x9c, + 0xed, 0x05, 0x15, 0x0d, 0x25, 0xfe, 0x66, 0x4b, 0x08, 0x25, 0x06, 0x49, 0x0a, 0xa5, 0xcd, 0xfb, + 0x49, 0x7c, 0x07, 0xc6, 0x93, 0xdf, 0x4e, 0x27, 0x5b, 0x6d, 0x24, 0x02, 0xa5, 0x7c, 0x8f, 0xc0, + 0x68, 0x4c, 0x71, 0x67, 0x09, 0x31, 0xc5, 0xdd, 0xcc, 0x77, 0x85, 0x70, 0x07, 0x37, 0x61, 0x7f, + 0xd3, 0xe5, 0x5f, 0x4e, 0x54, 0xe5, 0x72, 0xe9, 0x44, 0x67, 0x39, 0xb7, 0xfb, 0xb1, 0x00, 0x72, + 0x97, 0x9b, 0xd5, 0xb9, 0x44, 0x53, 0x1d, 0x34, 0xa4, 0x8b, 0xaf, 0xaa, 0xc1, 0xe9, 0x7c, 0x29, + 0xc0, 0x5c, 0x6f, 0xb7, 0x89, 0x1e, 0x5c, 0x24, 0xe8, 0x49, 0xff, 0xdc, 0x9d, 0x1e, 0x27, 0xf8, + 0x2e, 0x64, 0xda, 0x1e, 0xe5, 0xa7, 0x13, 0x6d, 0x27, 0x62, 0xa5, 0xa5, 0xde, 0xb1, 0xa1, 0x6f, + 0x69, 0xf0, 0xfd, 0x17, 0x0f, 0x4e, 0x0b, 0x2b, 0x57, 0xb7, 0x7f, 0x92, 0xfb, 0xb6, 0x9f, 0xc9, + 0xc2, 0xa3, 0x67, 0xb2, 0xf0, 0xe3, 0x33, 0x59, 0xf8, 0xf4, 0xb9, 0xdc, 0xf7, 0xe8, 0xb9, 0xdc, + 0xf7, 0xc3, 0x73, 0xb9, 0xef, 0xff, 0xf3, 0xa6, 0xe5, 0x97, 0xb7, 0x6e, 0xe5, 0x74, 0xb7, 0x92, + 0x77, 0x37, 0xdc, 0x05, 0x07, 0xf9, 0x77, 0x5c, 0x6f, 0x93, 0xfc, 0xce, 0xdf, 0x0d, 0xff, 0xf0, + 0xf0, 0xeb, 0x55, 0x84, 0x6f, 0x0d, 0xd1, 0x7f, 0x3b, 0xce, 0xff, 0x11, 0x00, 0x00, 0xff, 0xff, + 0xfa, 0xbe, 0x45, 0xe7, 0x7c, 0x19, 0x00, 0x00, } -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 +func (this *MsgLegacyGovUpdateParams) Equal(that interface{}) bool { + if that == nil { + return this == nil } - 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 + + that1, ok := that.(*MsgLegacyGovUpdateParams) + if !ok { + that2, ok := that.(MsgLegacyGovUpdateParams) + if ok { + that1 = &that2 + } else { + return false + } } - 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 that1 == nil { + return this == nil + } else if this == nil { + return false } - 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 + if this.Authority != that1.Authority { + return false } - 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 + if this.Title != that1.Title { + return false } - return dAtA[:n], nil -} - -func (m *MsgAggregateExchangeRateVoteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + 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 + } -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 + that1, ok := that.(*MsgGovUpdateParams) + if !ok { + that2, ok := that.(MsgGovUpdateParams) + if ok { + that1 = &that2 + } else { + return false + } } - 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 that1 == nil { + return this == nil + } else if this == nil { + return false } - 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 + if this.Authority != that1.Authority { + return false } - 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 + if this.Title != that1.Title { + return false } - 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 + if this.Description != that1.Description { + return false } - return dAtA[:n], nil -} - -func (m *MsgLegacyGovUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if !this.Plan.Equal(&that1.Plan) { + return false + } + return true } +func (this *MsgGovAddDenoms) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -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 + that1, ok := that.(*MsgGovAddDenoms) + if !ok { + that2, ok := that.(MsgGovAddDenoms) + if ok { + that1 = &that2 + } else { + return false } - 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 that1 == nil { + return this == nil + } else if this == nil { + return false } - 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 this.Authority != that1.Authority { + return false } - 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 this.Title != that1.Title { + return false } - 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 + if this.Description != that1.Description { + return false } - 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 + if this.Height != that1.Height { + return false } - 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 + if len(this.DenomList) != len(that1.DenomList) { + return false } - 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 + for i := range this.DenomList { + if !this.DenomList[i].Equal(&that1.DenomList[i]) { + return false } - 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 this.Mandatory != that1.Mandatory { + return false } - 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 + if that1.RewardBand == nil { + if this.RewardBand != nil { + return false + } + } else if !this.RewardBand.Equal(*that1.RewardBand) { + return false } - 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 + if len(this.CurrencyPairProviders) != len(that1.CurrencyPairProviders) { + return false } - 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 + for i := range this.CurrencyPairProviders { + if !this.CurrencyPairProviders[i].Equal(&that1.CurrencyPairProviders[i]) { + return false } } - 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 len(this.CurrencyDeviationThresholds) != len(that1.CurrencyDeviationThresholds) { + return false } - 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)) + for i := range this.CurrencyDeviationThresholds { + if !this.CurrencyDeviationThresholds[i].Equal(&that1.CurrencyDeviationThresholds[i]) { + return false } - i-- - dAtA[i] = 0x3a } - if m.Mandatory { - i-- - if m.Mandatory { - dAtA[i] = 1 + 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 { - dAtA[i] = 0 + return false } - 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 that1 == nil { + return this == nil + } else if this == nil { + return false } - if m.Height != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 + if this.Authority != that1.Authority { + return false } - 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 this.Title != that1.Title { + return false } - 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 this.Description != that1.Description { + return false } - 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 + if this.Height != that1.Height { + return false } - 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 + if len(this.CurrencyPairProviders) != len(that1.CurrencyPairProviders) { + return false } - 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 + for i := range this.CurrencyPairProviders { + if !this.CurrencyPairProviders[i].Equal(&that1.CurrencyPairProviders[i]) { + return false + } } - return dAtA[:n], nil -} - -func (m *MsgGovRemoveCurrencyPairProviders) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return true } +func (this *MsgGovRemoveCurrencyDeviationThresholds) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -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 + that1, ok := that.(*MsgGovRemoveCurrencyDeviationThresholds) + if !ok { + that2, ok := that.(MsgGovRemoveCurrencyDeviationThresholds) + if ok { + that1 = &that2 + } else { + return false } } - if m.Height != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - 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 this.Authority != that1.Authority { + return false } - 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 this.Title != that1.Title { + return false } - 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 + if this.Description != that1.Description { + return false } - 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 + if this.Height != that1.Height { + return false } - return dAtA[:n], nil + 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 + } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + 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 } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +// 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) + // FeedPrice defines a method for setting and elys price. + FeedPrice(ctx context.Context, in *MsgFeedPrice, opts ...grpc.CallOption) (*MsgFeedPriceResponse, error) + // FeedMultiplePrices defines a method for setting multiple elys prices. + FeedMultiplePrices(ctx context.Context, in *MsgFeedMultiplePrices, opts ...grpc.CallOption) (*MsgFeedMultiplePricesResponse, error) + // SetPriceFeeder defines a method for setting an elys price feeder. + SetPriceFeeder(ctx context.Context, in *MsgSetPriceFeeder, opts ...grpc.CallOption) (*MsgSetPriceFeederResponse, error) + // DeletePriceFeeder defines a method for deleting an elys price feeder. + DeletePriceFeeder(ctx context.Context, in *MsgDeletePriceFeeder, opts ...grpc.CallOption) (*MsgDeletePriceFeederResponse, error) + // RemoveAssetInfo defines a method for removing an elys asset info. + RemoveAssetInfo(ctx context.Context, in *MsgRemoveAssetInfo, opts ...grpc.CallOption) (*MsgRemoveAssetInfoResponse, error) + // AddPriceFeeders defines a method for adding elys price feeders. + AddPriceFeeders(ctx context.Context, in *MsgAddPriceFeeders, opts ...grpc.CallOption) (*MsgAddPriceFeedersResponse, error) + // RemovePriceFeeders defines a method for removing elys price feeders. + RemovePriceFeeders(ctx context.Context, in *MsgRemovePriceFeeders, opts ...grpc.CallOption) (*MsgRemovePriceFeedersResponse, error) + // CreateAssetInfo defines a method for creating elys asset infos. + CreateAssetInfo(ctx context.Context, in *MsgCreateAssetInfo, opts ...grpc.CallOption) (*MsgCreateAssetInfoResponse, 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) } -func (m *MsgGovRemoveCurrencyDeviationThresholds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +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, "/ojo.oracle.v1.Msg/AggregateExchangeRatePrevote", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgGovRemoveCurrencyDeviationThresholds) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) AggregateExchangeRateVote(ctx context.Context, in *MsgAggregateExchangeRateVote, opts ...grpc.CallOption) (*MsgAggregateExchangeRateVoteResponse, error) { + out := new(MsgAggregateExchangeRateVoteResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/AggregateExchangeRateVote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -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 +func (c *msgClient) DelegateFeedConsent(ctx context.Context, in *MsgDelegateFeedConsent, opts ...grpc.CallOption) (*MsgDelegateFeedConsentResponse, error) { + out := new(MsgDelegateFeedConsentResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/DelegateFeedConsent", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) FeedPrice(ctx context.Context, in *MsgFeedPrice, opts ...grpc.CallOption) (*MsgFeedPriceResponse, error) { + out := new(MsgFeedPriceResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/FeedPrice", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) FeedMultiplePrices(ctx context.Context, in *MsgFeedMultiplePrices, opts ...grpc.CallOption) (*MsgFeedMultiplePricesResponse, error) { + out := new(MsgFeedMultiplePricesResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/FeedMultiplePrices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *msgClient) SetPriceFeeder(ctx context.Context, in *MsgSetPriceFeeder, opts ...grpc.CallOption) (*MsgSetPriceFeederResponse, error) { + out := new(MsgSetPriceFeederResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/SetPriceFeeder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgGovCancelUpdateParamPlan) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) DeletePriceFeeder(ctx context.Context, in *MsgDeletePriceFeeder, opts ...grpc.CallOption) (*MsgDeletePriceFeederResponse, error) { + out := new(MsgDeletePriceFeederResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/DeletePriceFeeder", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgGovCancelUpdateParamPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) RemoveAssetInfo(ctx context.Context, in *MsgRemoveAssetInfo, opts ...grpc.CallOption) (*MsgRemoveAssetInfoResponse, error) { + out := new(MsgRemoveAssetInfoResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/RemoveAssetInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -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 +func (c *msgClient) AddPriceFeeders(ctx context.Context, in *MsgAddPriceFeeders, opts ...grpc.CallOption) (*MsgAddPriceFeedersResponse, error) { + out := new(MsgAddPriceFeedersResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/AddPriceFeeders", in, out, opts...) + if err != nil { + return nil, err } - 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 out, nil +} + +func (c *msgClient) RemovePriceFeeders(ctx context.Context, in *MsgRemovePriceFeeders, opts ...grpc.CallOption) (*MsgRemovePriceFeedersResponse, error) { + out := new(MsgRemovePriceFeedersResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/RemovePriceFeeders", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *MsgGovCancelUpdateParamPlanResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) CreateAssetInfo(ctx context.Context, in *MsgCreateAssetInfo, opts ...grpc.CallOption) (*MsgCreateAssetInfoResponse, error) { + out := new(MsgCreateAssetInfoResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/CreateAssetInfo", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgGovCancelUpdateParamPlanResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) LegacyGovUpdateParams(ctx context.Context, in *MsgLegacyGovUpdateParams, opts ...grpc.CallOption) (*MsgLegacyGovUpdateParamsResponse, error) { + out := new(MsgLegacyGovUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/LegacyGovUpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgGovCancelUpdateParamPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *msgClient) GovUpdateParams(ctx context.Context, in *MsgGovUpdateParams, opts ...grpc.CallOption) (*MsgGovUpdateParamsResponse, error) { + out := new(MsgGovUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovUpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, 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++ +func (c *msgClient) GovAddDenoms(ctx context.Context, in *MsgGovAddDenoms, opts ...grpc.CallOption) (*MsgGovAddDenomsResponse, error) { + out := new(MsgGovAddDenomsResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovAddDenoms", in, out, opts...) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return out, nil } -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)) + +func (c *msgClient) GovRemoveCurrencyPairProviders(ctx context.Context, in *MsgGovRemoveCurrencyPairProviders, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyPairProvidersResponse, error) { + out := new(MsgGovRemoveCurrencyPairProvidersResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovRemoveCurrencyPairProviders", in, out, opts...) + if err != nil { + return nil, err } - return n + return out, nil } -func (m *MsgAggregateExchangeRatePrevoteResponse) Size() (n int) { - if m == nil { - return 0 +func (c *msgClient) GovRemoveCurrencyDeviationThresholds(ctx context.Context, in *MsgGovRemoveCurrencyDeviationThresholds, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { + out := new(MsgGovRemoveCurrencyDeviationThresholdsResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovRemoveCurrencyDeviationThresholds", in, out, opts...) + if err != nil { + return nil, err } - var l int - _ = l - return n + return out, nil } -func (m *MsgAggregateExchangeRateVote) Size() (n int) { - if m == nil { - return 0 +func (c *msgClient) GovCancelUpdateParamPlan(ctx context.Context, in *MsgGovCancelUpdateParamPlan, opts ...grpc.CallOption) (*MsgGovCancelUpdateParamPlanResponse, error) { + out := new(MsgGovCancelUpdateParamPlanResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Msg/GovCancelUpdateParamPlan", in, out, opts...) + if err != nil { + return nil, err } - var l int - _ = l - l = len(m.Salt) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + 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) + // FeedPrice defines a method for setting and elys price. + FeedPrice(context.Context, *MsgFeedPrice) (*MsgFeedPriceResponse, error) + // FeedMultiplePrices defines a method for setting multiple elys prices. + FeedMultiplePrices(context.Context, *MsgFeedMultiplePrices) (*MsgFeedMultiplePricesResponse, error) + // SetPriceFeeder defines a method for setting an elys price feeder. + SetPriceFeeder(context.Context, *MsgSetPriceFeeder) (*MsgSetPriceFeederResponse, error) + // DeletePriceFeeder defines a method for deleting an elys price feeder. + DeletePriceFeeder(context.Context, *MsgDeletePriceFeeder) (*MsgDeletePriceFeederResponse, error) + // RemoveAssetInfo defines a method for removing an elys asset info. + RemoveAssetInfo(context.Context, *MsgRemoveAssetInfo) (*MsgRemoveAssetInfoResponse, error) + // AddPriceFeeders defines a method for adding elys price feeders. + AddPriceFeeders(context.Context, *MsgAddPriceFeeders) (*MsgAddPriceFeedersResponse, error) + // RemovePriceFeeders defines a method for removing elys price feeders. + RemovePriceFeeders(context.Context, *MsgRemovePriceFeeders) (*MsgRemovePriceFeedersResponse, error) + // CreateAssetInfo defines a method for creating elys asset infos. + CreateAssetInfo(context.Context, *MsgCreateAssetInfo) (*MsgCreateAssetInfoResponse, 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) FeedPrice(ctx context.Context, req *MsgFeedPrice) (*MsgFeedPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeedPrice not implemented") +} +func (*UnimplementedMsgServer) FeedMultiplePrices(ctx context.Context, req *MsgFeedMultiplePrices) (*MsgFeedMultiplePricesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeedMultiplePrices not implemented") +} +func (*UnimplementedMsgServer) SetPriceFeeder(ctx context.Context, req *MsgSetPriceFeeder) (*MsgSetPriceFeederResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPriceFeeder not implemented") +} +func (*UnimplementedMsgServer) DeletePriceFeeder(ctx context.Context, req *MsgDeletePriceFeeder) (*MsgDeletePriceFeederResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePriceFeeder not implemented") +} +func (*UnimplementedMsgServer) RemoveAssetInfo(ctx context.Context, req *MsgRemoveAssetInfo) (*MsgRemoveAssetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveAssetInfo not implemented") +} +func (*UnimplementedMsgServer) AddPriceFeeders(ctx context.Context, req *MsgAddPriceFeeders) (*MsgAddPriceFeedersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddPriceFeeders not implemented") +} +func (*UnimplementedMsgServer) RemovePriceFeeders(ctx context.Context, req *MsgRemovePriceFeeders) (*MsgRemovePriceFeedersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemovePriceFeeders not implemented") +} +func (*UnimplementedMsgServer) CreateAssetInfo(ctx context.Context, req *MsgCreateAssetInfo) (*MsgCreateAssetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAssetInfo 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 } - l = len(m.ExchangeRates) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if interceptor == nil { + return srv.(MsgServer).AggregateExchangeRatePrevote(ctx, in) } - l = len(m.Feeder) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/AggregateExchangeRatePrevote", } - l = len(m.Validator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AggregateExchangeRatePrevote(ctx, req.(*MsgAggregateExchangeRatePrevote)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *MsgAggregateExchangeRateVoteResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - return n -} - -func (m *MsgDelegateFeedConsent) Size() (n int) { - if m == nil { - return 0 + if interceptor == nil { + return srv.(MsgServer).AggregateExchangeRateVote(ctx, in) } - var l int - _ = l - l = len(m.Operator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/AggregateExchangeRateVote", } - l = len(m.Delegate) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AggregateExchangeRateVote(ctx, req.(*MsgAggregateExchangeRateVote)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *MsgDelegateFeedConsentResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - return n + if interceptor == nil { + return srv.(MsgServer).DelegateFeedConsent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (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)) +func _Msg_FeedPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFeedPrice) + if err := dec(in); err != nil { + return nil, err } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if interceptor == nil { + return srv.(MsgServer).FeedPrice(ctx, in) } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/FeedPrice", } - if len(m.Keys) > 0 { - for _, s := range m.Keys { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FeedPrice(ctx, req.(*MsgFeedPrice)) } - l = m.Changes.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return interceptor(ctx, in, info, handler) } -func (m *MsgLegacyGovUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_FeedMultiplePrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFeedMultiplePrices) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n + if interceptor == nil { + return srv.(MsgServer).FeedMultiplePrices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/FeedMultiplePrices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FeedMultiplePrices(ctx, req.(*MsgFeedMultiplePrices)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgGovUpdateParams) Size() (n int) { - if m == nil { - return 0 +func _Msg_SetPriceFeeder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetPriceFeeder) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if interceptor == nil { + return srv.(MsgServer).SetPriceFeeder(ctx, in) } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/SetPriceFeeder", } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetPriceFeeder(ctx, req.(*MsgSetPriceFeeder)) } - l = m.Plan.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return interceptor(ctx, in, info, handler) } -func (m *MsgGovUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_DeletePriceFeeder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeletePriceFeeder) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n -} - -func (m *MsgGovAddDenoms) Size() (n int) { - if m == nil { - return 0 + if interceptor == nil { + return srv.(MsgServer).DeletePriceFeeder(ctx, in) } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/DeletePriceFeeder", } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeletePriceFeeder(ctx, req.(*MsgDeletePriceFeeder)) } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveAssetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveAssetInfo) + if err := dec(in); err != nil { + return nil, err } - if m.Height != 0 { - n += 1 + sovTx(uint64(m.Height)) + if interceptor == nil { + return srv.(MsgServer).RemoveAssetInfo(ctx, in) } - if len(m.DenomList) > 0 { - for _, e := range m.DenomList { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/RemoveAssetInfo", } - if m.Mandatory { - n += 2 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveAssetInfo(ctx, req.(*MsgRemoveAssetInfo)) } - if m.RewardBand != nil { - l = m.RewardBand.Size() - n += 1 + l + sovTx(uint64(l)) + return interceptor(ctx, in, info, handler) +} + +func _Msg_AddPriceFeeders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddPriceFeeders) + if err := dec(in); err != nil { + return nil, err } - if len(m.CurrencyPairProviders) > 0 { - for _, e := range m.CurrencyPairProviders { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } + if interceptor == nil { + return srv.(MsgServer).AddPriceFeeders(ctx, in) } - if len(m.CurrencyDeviationThresholds) > 0 { - for _, e := range m.CurrencyDeviationThresholds { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/AddPriceFeeders", } - return n -} - -func (m *MsgGovAddDenomsResponse) Size() (n int) { - if m == nil { - return 0 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddPriceFeeders(ctx, req.(*MsgAddPriceFeeders)) } - var l int - _ = l - return n + return interceptor(ctx, in, info, handler) } -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)) +func _Msg_RemovePriceFeeders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemovePriceFeeders) + if err := dec(in); err != nil { + return nil, err } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if interceptor == nil { + return srv.(MsgServer).RemovePriceFeeders(ctx, in) } - if m.Height != 0 { - n += 1 + sovTx(uint64(m.Height)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/RemovePriceFeeders", } - if len(m.CurrencyPairProviders) > 0 { - for _, e := range m.CurrencyPairProviders { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemovePriceFeeders(ctx, req.(*MsgRemovePriceFeeders)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *MsgGovRemoveCurrencyPairProvidersResponse) Size() (n int) { - if m == nil { - return 0 +func _Msg_CreateAssetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateAssetInfo) + if err := dec(in); err != nil { + return nil, err } - var l int - _ = l - return n -} - -func (m *MsgGovRemoveCurrencyDeviationThresholds) Size() (n int) { - if m == nil { - return 0 + if interceptor == nil { + return srv.(MsgServer).CreateAssetInfo(ctx, in) } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/CreateAssetInfo", } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateAssetInfo(ctx, req.(*MsgCreateAssetInfo)) } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + 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 m.Height != 0 { - n += 1 + sovTx(uint64(m.Height)) + if interceptor == nil { + return srv.(MsgServer).LegacyGovUpdateParams(ctx, in) } - if len(m.Currencies) > 0 { - for _, s := range m.Currencies { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/LegacyGovUpdateParams", } - return n + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LegacyGovUpdateParams(ctx, req.(*MsgLegacyGovUpdateParams)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l - return n + if interceptor == nil { + return srv.(MsgServer).GovUpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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 (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)) +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 } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if interceptor == nil { + return srv.(MsgServer).GovAddDenoms(ctx, in) } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Msg/GovAddDenoms", } - if m.Height != 0 { - n += 1 + sovTx(uint64(m.Height)) + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovAddDenoms(ctx, req.(*MsgGovAddDenoms)) } - return n + return interceptor(ctx, in, info, handler) } -func (m *MsgGovCancelUpdateParamPlanResponse) Size() (n int) { - if m == nil { - return 0 +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 } - var l int - _ = l + if interceptor == nil { + return srv.(MsgServer).GovRemoveCurrencyPairProviders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.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: "/ojo.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: "/ojo.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: "ojo.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: "FeedPrice", + Handler: _Msg_FeedPrice_Handler, + }, + { + MethodName: "FeedMultiplePrices", + Handler: _Msg_FeedMultiplePrices_Handler, + }, + { + MethodName: "SetPriceFeeder", + Handler: _Msg_SetPriceFeeder_Handler, + }, + { + MethodName: "DeletePriceFeeder", + Handler: _Msg_DeletePriceFeeder_Handler, + }, + { + MethodName: "RemoveAssetInfo", + Handler: _Msg_RemoveAssetInfo_Handler, + }, + { + MethodName: "AddPriceFeeders", + Handler: _Msg_AddPriceFeeders_Handler, + }, + { + MethodName: "RemovePriceFeeders", + Handler: _Msg_RemovePriceFeeders_Handler, + }, + { + MethodName: "CreateAssetInfo", + Handler: _Msg_CreateAssetInfo_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: "ojo/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 *FeedPrice) 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 *FeedPrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeedPrice) 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 = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintTx(dAtA, i, uint64(len(m.Asset))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFeedPrice) 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 *MsgFeedPrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFeedPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.FeedPrice.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintTx(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFeedPriceResponse) 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 *MsgFeedPriceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFeedPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSetPriceFeeder) 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 *MsgSetPriceFeeder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetPriceFeeder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsActive { + i-- + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetPriceFeederResponse) 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 *MsgSetPriceFeederResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetPriceFeederResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeletePriceFeeder) 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 *MsgDeletePriceFeeder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeletePriceFeeder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeletePriceFeederResponse) 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 *MsgDeletePriceFeederResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeletePriceFeederResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgFeedMultiplePrices) 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 *MsgFeedMultiplePrices) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFeedMultiplePrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeedPrices) > 0 { + for iNdEx := len(m.FeedPrices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FeedPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgFeedMultiplePricesResponse) 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 *MsgFeedMultiplePricesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFeedMultiplePricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemoveAssetInfo) 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 *MsgRemoveAssetInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveAssetInfo) 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 = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + 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 *MsgRemoveAssetInfoResponse) 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 *MsgRemoveAssetInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveAssetInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAddPriceFeeders) 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 *MsgAddPriceFeeders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddPriceFeeders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Feeders) > 0 { + for iNdEx := len(m.Feeders) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Feeders[iNdEx]) + copy(dAtA[i:], m.Feeders[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Feeders[iNdEx]))) + 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 *MsgAddPriceFeedersResponse) 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 *MsgAddPriceFeedersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddPriceFeedersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemovePriceFeeders) 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 *MsgRemovePriceFeeders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemovePriceFeeders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Feeders) > 0 { + for iNdEx := len(m.Feeders) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Feeders[iNdEx]) + copy(dAtA[i:], m.Feeders[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Feeders[iNdEx]))) + 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 *MsgRemovePriceFeedersResponse) 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 *MsgRemovePriceFeedersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemovePriceFeedersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateAssetInfo) 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 *MsgCreateAssetInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateAssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Decimal != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Decimal)) + i-- + dAtA[i] = 0x28 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x22 + } + if len(m.Display) > 0 { + i -= len(m.Display) + copy(dAtA[i:], m.Display) + i = encodeVarintTx(dAtA, i, uint64(len(m.Display))) + i-- + dAtA[i] = 0x1a + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateAssetInfoResponse) 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 *MsgCreateAssetInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateAssetInfoResponse) 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 *FeedPrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Asset) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgFeedPrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.FeedPrice.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgFeedPriceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSetPriceFeeder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Feeder) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.IsActive { + n += 2 + } + return n +} + +func (m *MsgSetPriceFeederResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeletePriceFeeder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Feeder) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDeletePriceFeederResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgFeedMultiplePrices) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.FeedPrices) > 0 { + for _, e := range m.FeedPrices { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgFeedMultiplePricesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemoveAssetInfo) 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.Denom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRemoveAssetInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAddPriceFeeders) 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)) + } + if len(m.Feeders) > 0 { + for _, s := range m.Feeders { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgAddPriceFeedersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemovePriceFeeders) 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)) + } + if len(m.Feeders) > 0 { + for _, s := range m.Feeders { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgRemovePriceFeedersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateAssetInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Display) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Decimal != 0 { + n += 1 + sovTx(uint64(m.Decimal)) + } + return n +} + +func (m *MsgCreateAssetInfoResponse) 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 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 *FeedPrice) 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: FeedPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeedPrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", 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.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 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 + } + if err := m.Price.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 *MsgFeedPrice) 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: MsgFeedPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFeedPrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", 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.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeedPrice", 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.FeedPrice.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 *MsgFeedPriceResponse) 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: MsgFeedPriceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFeedPriceResponse: 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 *MsgSetPriceFeeder) 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: MsgSetPriceFeeder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetPriceFeeder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", 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.IsActive = bool(v != 0) + 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 *MsgSetPriceFeederResponse) 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: MsgSetPriceFeederResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetPriceFeederResponse: 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 *MsgDeletePriceFeeder) 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: MsgDeletePriceFeeder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeletePriceFeeder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 + 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 *MsgDeletePriceFeederResponse) 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: MsgDeletePriceFeederResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeletePriceFeederResponse: 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 *MsgFeedMultiplePrices) 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: MsgFeedMultiplePrices: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFeedMultiplePrices: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeedPrices", 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.FeedPrices = append(m.FeedPrices, FeedPrice{}) + if err := m.FeedPrices[len(m.FeedPrices)-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 *MsgFeedMultiplePricesResponse) 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: MsgFeedMultiplePricesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFeedMultiplePricesResponse: 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 *MsgAggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { +func (m *MsgRemoveAssetInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2645,15 +5753,15 @@ func (m *MsgAggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAggregateExchangeRatePrevote: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemoveAssetInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAggregateExchangeRatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRemoveAssetInfo: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2681,43 +5789,11 @@ func (m *MsgAggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hash = string(dAtA[iNdEx:postIndex]) + m.Authority = 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) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2745,7 +5821,7 @@ func (m *MsgAggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validator = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2768,7 +5844,7 @@ func (m *MsgAggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAggregateExchangeRatePrevoteResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRemoveAssetInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2791,10 +5867,10 @@ func (m *MsgAggregateExchangeRatePrevoteResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAggregateExchangeRatePrevoteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemoveAssetInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAggregateExchangeRatePrevoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRemoveAssetInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2818,7 +5894,7 @@ func (m *MsgAggregateExchangeRatePrevoteResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { +func (m *MsgAddPriceFeeders) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2841,15 +5917,15 @@ func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAggregateExchangeRateVote: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddPriceFeeders: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAggregateExchangeRateVote: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddPriceFeeders: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2877,11 +5953,11 @@ func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Salt = string(dAtA[iNdEx:postIndex]) + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Feeders", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2909,11 +5985,111 @@ func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExchangeRates = string(dAtA[iNdEx:postIndex]) + m.Feeders = append(m.Feeders, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: + 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 *MsgAddPriceFeedersResponse) 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: MsgAddPriceFeedersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddPriceFeedersResponse: 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 *MsgRemovePriceFeeders) 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: MsgRemovePriceFeeders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemovePriceFeeders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2941,11 +6117,11 @@ func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Feeder = string(dAtA[iNdEx:postIndex]) + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Feeders", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2973,7 +6149,7 @@ func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validator = string(dAtA[iNdEx:postIndex]) + m.Feeders = append(m.Feeders, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -2996,7 +6172,7 @@ func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAggregateExchangeRateVoteResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRemovePriceFeedersResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3019,10 +6195,10 @@ func (m *MsgAggregateExchangeRateVoteResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAggregateExchangeRateVoteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRemovePriceFeedersResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAggregateExchangeRateVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRemovePriceFeedersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3046,7 +6222,7 @@ func (m *MsgAggregateExchangeRateVoteResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDelegateFeedConsent) Unmarshal(dAtA []byte) error { +func (m *MsgCreateAssetInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3069,15 +6245,15 @@ func (m *MsgDelegateFeedConsent) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDelegateFeedConsent: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateAssetInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDelegateFeedConsent: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateAssetInfo: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3105,11 +6281,11 @@ func (m *MsgDelegateFeedConsent) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operator = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3137,8 +6313,91 @@ func (m *MsgDelegateFeedConsent) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Delegate = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Display", 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.Display = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", 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.Ticker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimal", wireType) + } + m.Decimal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3160,7 +6419,7 @@ func (m *MsgDelegateFeedConsent) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDelegateFeedConsentResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCreateAssetInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3183,10 +6442,10 @@ func (m *MsgDelegateFeedConsentResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDelegateFeedConsentResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateAssetInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDelegateFeedConsentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateAssetInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/oracle/types/utils_test.go b/x/oracle/types/utils_test.go index 091da7ce..cbb5bce0 100644 --- a/x/oracle/types/utils_test.go +++ b/x/oracle/types/utils_test.go @@ -6,7 +6,6 @@ import ( "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" @@ -122,34 +121,14 @@ func (sk MockStakingKeeper) Validator(_ context.Context, address sdk.ValAddress) 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 diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go index 505342e7..a66abfc8 100644 --- a/x/oracle/types/vote.go +++ b/x/oracle/types/vote.go @@ -29,11 +29,11 @@ func (v AggregateExchangeRatePrevote) String() string { func NewAggregateExchangeRateVote( decCoins sdk.DecCoins, - voter sdk.ValAddress, + voter string, ) AggregateExchangeRateVote { return AggregateExchangeRateVote{ ExchangeRates: decCoins, - Voter: voter.String(), + Voter: voter, } } @@ -69,7 +69,10 @@ func ParseExchangeRateDecCoins(tuplesStr string) (sdk.DecCoins, error) { denom := strings.ToUpper(denomAmountStr[0]) - decCoins[i] = sdk.NewDecCoinFromDec(denom, dec) + decCoins[i] = sdk.DecCoin{ + Denom: denom, + Amount: dec, + } if _, ok := duplicateCheckMap[denom]; ok { return nil, fmt.Errorf("duplicated denom %s", denom) diff --git a/x/oracle/types/vote_test.go b/x/oracle/types/vote_test.go index 67e31006..6bc7b181 100644 --- a/x/oracle/types/vote_test.go +++ b/x/oracle/types/vote_test.go @@ -33,7 +33,7 @@ func TestAggregateExchangeRateVoteString(t *testing.T) { sdk.DecCoins{ sdk.NewDecCoinFromDec(types.OjoDenom, math.LegacyOneDec()), }, - sdk.ValAddress(sdk.AccAddress([]byte("addr1_______________"))), + sdk.ValAddress(sdk.AccAddress([]byte("addr1_______________"))).String(), ) require.Equal(t, "exchangerates:\n - denom: uojo\n amount: \"1.000000000000000000\"\nvoter: ojovaloper1v9jxgu33ta047h6lta047h6lta047h6ludnc0y\n", aggregateExchangeRatePreVote.String())