From 6a371842df255e855cfa58c1de2d87c186fd46ee Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Fri, 21 Oct 2022 07:50:52 -0700 Subject: [PATCH 1/8] fix: core/coins: skip 2 int64(uint32) casts by comparison checks and silence gosec warnings (#13611) --- core/coins/format.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/coins/format.go b/core/coins/format.go index 53a5ae0ff1bd..b363ecb2e2b0 100644 --- a/core/coins/format.go +++ b/core/coins/format.go @@ -44,17 +44,15 @@ func formatCoin(coin *basev1beta1.Coin, metadata *bankv1beta1.Metadata) (string, return vr + " " + coin.Denom, err } - exponentDiff := int64(coinExp) - int64(dispExp) - dispAmount, err := math.LegacyNewDecFromStr(coin.Amount) if err != nil { return "", err } - if exponentDiff > 0 { - dispAmount = dispAmount.Mul(math.LegacyNewDec(10).Power(uint64(exponentDiff))) + if coinExp > dispExp { + dispAmount = dispAmount.Mul(math.LegacyNewDec(10).Power(uint64(coinExp - dispExp))) } else { - dispAmount = dispAmount.Quo(math.LegacyNewDec(10).Power(uint64(-exponentDiff))) + dispAmount = dispAmount.Quo(math.LegacyNewDec(10).Power(uint64(dispExp - coinExp))) } vr, err := math.FormatDec(dispAmount.String()) From 7d6601e1fb8644ee592a996b303073d675661126 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 21 Oct 2022 17:15:20 +0200 Subject: [PATCH 2/8] refactor: clean-up SDK tools (#13603) --- .github/dependabot.yml | 9 +- CHANGELOG.md | 1 + Makefile | 2 +- contrib/images/simd-dlv/Dockerfile | 1 - contrib/images/simd-env/Dockerfile | 1 - cosmovisor/RELEASE_NOTES.md | 7 - docs/pre.sh | 2 +- ...al_proofs_createnonmembershipproof_test.go | 43 ---- go.mod | 3 +- go.sum | 6 +- go.work.example | 3 +- store/tools/ics23/Makefile | 44 ---- store/tools/ics23/go.mod | 43 ---- store/tools/ics23/go.sum | 210 --------------- store/tools/ics23/helpers.go | 62 ----- store/tools/ics23/iavl/Makefile | 18 -- store/tools/ics23/iavl/README.md | 44 ---- .../tools/ics23/iavl/cmd/testgen-iavl/main.go | 201 --------------- store/tools/ics23/iavl/convert.go | 98 ------- store/tools/ics23/iavl/convert_test.go | 30 --- store/tools/ics23/iavl/create.go | 102 -------- store/tools/ics23/iavl/create_test.go | 80 ------ store/tools/ics23/iavl/helpers/helpers.go | 108 -------- store/tools/ics23/smt/Makefile | 24 -- store/tools/ics23/smt/README.md | 39 --- store/tools/ics23/smt/cmd/testgen-smt/main.go | 214 ---------------- store/tools/ics23/smt/create.go | 126 --------- store/tools/ics23/smt/create_test.go | 84 ------ store/tools/ics23/smt/helpers/helpers.go | 131 ---------- store/tools/ics23/smt/helpers/random.go | 34 --- store/tools/ics23/tendermint/Makefile | 24 -- store/tools/ics23/tendermint/README.md | 39 --- .../tendermint/cmd/testgen-simple/main.go | 241 ------------------ {cosmovisor => tools/cosmovisor}/.gitignore | 0 .../cosmovisor}/.goreleaser.yml | 0 {cosmovisor => tools/cosmovisor}/CHANGELOG.md | 6 + {cosmovisor => tools/cosmovisor}/Makefile | 0 {cosmovisor => tools/cosmovisor}/README.md | 2 +- tools/cosmovisor/RELEASE_NOTES.md | 7 + {cosmovisor => tools/cosmovisor}/args.go | 2 +- {cosmovisor => tools/cosmovisor}/args_test.go | 2 +- .../cosmovisor}/buffer_test.go | 0 .../cosmovisor}/cmd/cosmovisor/help.go | 2 +- .../cosmovisor}/cmd/cosmovisor/help_test.go | 2 +- .../cosmovisor}/cmd/cosmovisor/init.go | 4 +- .../cosmovisor}/cmd/cosmovisor/init_test.go | 2 +- .../cosmovisor}/cmd/cosmovisor/main.go | 4 +- .../cosmovisor}/cmd/cosmovisor/root.go | 0 .../cosmovisor}/cmd/cosmovisor/run.go | 2 +- .../cosmovisor}/cmd/cosmovisor/run_config.go | 0 .../cosmovisor}/cmd/cosmovisor/run_test.go | 0 .../cosmovisor}/cmd/cosmovisor/version.go | 2 +- .../cmd/cosmovisor/version_test.go | 2 +- .../cosmovisor}/errors/multi.go | 0 .../cosmovisor}/errors/multi_test.go | 0 {cosmovisor => tools/cosmovisor}/go.mod | 2 +- {cosmovisor => tools/cosmovisor}/go.sum | 0 {cosmovisor => tools/cosmovisor}/logger.go | 0 {cosmovisor => tools/cosmovisor}/process.go | 0 .../cosmovisor}/process_test.go | 2 +- {cosmovisor => tools/cosmovisor}/scanner.go | 0 .../cosmovisor}/scanner_test.go | 0 .../download/cosmovisor/genesis/bin/autod | 0 .../testdata/download/data/.gitkeep | 0 .../testdata/repo/chain2-zip_bin/autod | 0 .../testdata/repo/chain2-zip_bin/autod.zip | Bin .../testdata/repo/chain3-zip_dir/autod.zip | Bin .../testdata/repo/chain3-zip_dir/bin/autod | 0 .../testdata/repo/raw_binary/autod | 0 .../testdata/repo/ref_to_chain3-zip_dir.json | 0 .../testdata/repo/zip_directory/autod.zip | Bin .../testdata/upgrade-files/f1-good.json | 0 .../testdata/upgrade-files/f2-bad-type-2.json | 0 .../testdata/upgrade-files/f2-bad-type.json | 0 .../upgrade-files/f2-normalized-name.json | 0 .../testdata/upgrade-files/f3-empty.json | 0 .../testdata/upgrade-files/f4-empty-obj.json | 0 .../upgrade-files/f5-partial-obj-1.json | 0 .../upgrade-files/f5-partial-obj-2.json | 0 .../validate/cosmovisor/genesis/bin/dummyd | 0 .../cosmovisor/upgrades/chain2/bin/dummyd | 0 .../cosmovisor/upgrades/chain3/bin/dummyd | 0 .../cosmovisor/upgrades/nobin/bin/.keep | 0 .../cosmovisor/upgrades/noexec/bin/dummyd | 0 .../testdata/validate/data/.gitkeep | 0 {cosmovisor => tools/cosmovisor}/upgrade.go | 0 .../cosmovisor}/upgrade_test.go | 2 +- x/gov/README.md | 2 +- x/upgrade/README.md | 2 +- 89 files changed, 41 insertions(+), 2082 deletions(-) delete mode 100644 cosmovisor/RELEASE_NOTES.md delete mode 100644 fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go delete mode 100644 store/tools/ics23/Makefile delete mode 100644 store/tools/ics23/go.mod delete mode 100644 store/tools/ics23/go.sum delete mode 100644 store/tools/ics23/helpers.go delete mode 100644 store/tools/ics23/iavl/Makefile delete mode 100644 store/tools/ics23/iavl/README.md delete mode 100644 store/tools/ics23/iavl/cmd/testgen-iavl/main.go delete mode 100644 store/tools/ics23/iavl/convert.go delete mode 100644 store/tools/ics23/iavl/convert_test.go delete mode 100644 store/tools/ics23/iavl/create.go delete mode 100644 store/tools/ics23/iavl/create_test.go delete mode 100644 store/tools/ics23/iavl/helpers/helpers.go delete mode 100644 store/tools/ics23/smt/Makefile delete mode 100644 store/tools/ics23/smt/README.md delete mode 100644 store/tools/ics23/smt/cmd/testgen-smt/main.go delete mode 100644 store/tools/ics23/smt/create.go delete mode 100644 store/tools/ics23/smt/create_test.go delete mode 100644 store/tools/ics23/smt/helpers/helpers.go delete mode 100644 store/tools/ics23/smt/helpers/random.go delete mode 100644 store/tools/ics23/tendermint/Makefile delete mode 100644 store/tools/ics23/tendermint/README.md delete mode 100644 store/tools/ics23/tendermint/cmd/testgen-simple/main.go rename {cosmovisor => tools/cosmovisor}/.gitignore (100%) rename {cosmovisor => tools/cosmovisor}/.goreleaser.yml (100%) rename {cosmovisor => tools/cosmovisor}/CHANGELOG.md (96%) rename {cosmovisor => tools/cosmovisor}/Makefile (100%) rename {cosmovisor => tools/cosmovisor}/README.md (99%) create mode 100644 tools/cosmovisor/RELEASE_NOTES.md rename {cosmovisor => tools/cosmovisor}/args.go (99%) rename {cosmovisor => tools/cosmovisor}/args_test.go (99%) rename {cosmovisor => tools/cosmovisor}/buffer_test.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/help.go (95%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/help_test.go (98%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/init.go (97%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/init_test.go (99%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/main.go (73%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/root.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/run.go (97%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/run_config.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/run_test.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/version.go (97%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/version_test.go (91%) rename {cosmovisor => tools/cosmovisor}/errors/multi.go (100%) rename {cosmovisor => tools/cosmovisor}/errors/multi_test.go (100%) rename {cosmovisor => tools/cosmovisor}/go.mod (99%) rename {cosmovisor => tools/cosmovisor}/go.sum (100%) rename {cosmovisor => tools/cosmovisor}/logger.go (100%) rename {cosmovisor => tools/cosmovisor}/process.go (100%) rename {cosmovisor => tools/cosmovisor}/process_test.go (99%) rename {cosmovisor => tools/cosmovisor}/scanner.go (100%) rename {cosmovisor => tools/cosmovisor}/scanner_test.go (100%) rename {cosmovisor => tools/cosmovisor}/testdata/download/cosmovisor/genesis/bin/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/download/data/.gitkeep (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain2-zip_bin/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain2-zip_bin/autod.zip (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain3-zip_dir/autod.zip (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain3-zip_dir/bin/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/raw_binary/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/ref_to_chain3-zip_dir.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/zip_directory/autod.zip (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f1-good.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f2-bad-type-2.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f2-bad-type.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f2-normalized-name.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f3-empty.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f4-empty-obj.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f5-partial-obj-1.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f5-partial-obj-2.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/genesis/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/data/.gitkeep (100%) rename {cosmovisor => tools/cosmovisor}/upgrade.go (100%) rename {cosmovisor => tools/cosmovisor}/upgrade_test.go (99%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7e8bef0d5f2c..b3dde78c89fb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -56,7 +56,7 @@ updates: - "A:automerge" - dependencies - package-ecosystem: gomod - directory: "/cosmovisor" + directory: "/tools/cosmovisor" schedule: interval: weekly labels: @@ -90,13 +90,6 @@ updates: labels: - "A:automerge" - dependencies - - package-ecosystem: gomod - directory: "/store/tools/ics23" - schedule: - interval: weekly - labels: - - "A:automerge" - - dependencies - package-ecosystem: gomod directory: "/tx" schedule: diff --git a/CHANGELOG.md b/CHANGELOG.md index 462a55943c53..8e0289c0d09d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* (tools) [#13603](https://github.com/cosmos/cosmos-sdk/pull/13603) Rename cosmovisor package name to `cosmossdk.io/tools/cosmovisor`. The new tool directory contains Cosmos SDK tools. * (deps) [#13397](https://github.com/cosmos/cosmos-sdk/pull/13397) Bump Go version minimum requirement to `1.19`. * [#13070](https://github.com/cosmos/cosmos-sdk/pull/13070) Migrate from `gogo/protobuf` to `cosmos/gogoproto`. * [#12995](https://github.com/cosmos/cosmos-sdk/pull/12995) Add `FormatTime` and `ParseTimeString` methods. diff --git a/Makefile b/Makefile index 337311a3b577..130cbfeeadc1 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ $(BUILDDIR)/: mkdir -p $(BUILDDIR)/ cosmovisor: - $(MAKE) -C cosmovisor cosmovisor + $(MAKE) -C tools/cosmovisor cosmovisor .PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index 1a25c4d31a7a..85850839e692 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -10,7 +10,6 @@ COPY math/go.mod math/go.sum /work/math/ COPY api/go.mod api/go.sum /work/api/ COPY core/go.mod core/go.sum /work/core/ COPY depinject/go.mod depinject/go.sum /work/depinject/ -COPY store/tools/ics23/go.mod store/tools/ics23/go.sum /work/store/tools/ics23/ RUN go mod download COPY ./ /work diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index 5df38271cd53..f0c75954bccf 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -9,7 +9,6 @@ COPY math/go.mod math/go.sum /work/math/ COPY api/go.mod api/go.sum /work/api/ COPY core/go.mod core/go.sum /work/core/ COPY depinject/go.mod depinject/go.sum /work/depinject/ -COPY store/tools/ics23/go.mod store/tools/ics23/go.sum /work/store/tools/ics23/ RUN go mod download COPY ./ /work diff --git a/cosmovisor/RELEASE_NOTES.md b/cosmovisor/RELEASE_NOTES.md deleted file mode 100644 index 828eee43bd19..000000000000 --- a/cosmovisor/RELEASE_NOTES.md +++ /dev/null @@ -1,7 +0,0 @@ -# Cosmovisor v1.3.0 Release Notes - -* Fix failure when installing cosmovisor via `go install`. - -### Changelog - -For more details, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/cosmovisor/v1.2.1/cosmovisor/CHANGELOG.md). diff --git a/docs/pre.sh b/docs/pre.sh index 284457ed9320..5498927cc05a 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -21,7 +21,7 @@ cp -r ../x/auth/vesting/README.md ./docs/modules/vesting/README.md cat ../x/README.md | sed 's/\.\.\/docs\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./docs/modules/README.md ## Add Cosmovisor documentation -cp ../cosmovisor/README.md ./docs/tooling/01-cosmovisor.md +cp ../tools/cosmovisor/README.md ./docs/tooling/01-cosmovisor.md ## Add depinject documentation cp ../depinject/README.md ./docs/building-apps/01-depinject.md diff --git a/fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go b/fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go deleted file mode 100644 index 74210b576c36..000000000000 --- a/fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build gofuzz || go1.18 - -package tests - -import ( - "encoding/json" - "testing" - - iavlproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl" - "github.com/cosmos/iavl" - db "github.com/tendermint/tm-db" -) - -type serialize struct { - Data map[string][]byte - Key string -} - -func FuzzStoreInternalProofsCreateNonmembershipProof(f *testing.F) { - f.Fuzz(func(t *testing.T, data []byte) { - sz := new(serialize) - if err := json.Unmarshal(data, sz); err != nil { - return - } - if len(sz.Data) == 0 || len(sz.Key) == 0 { - return - } - tree, err := iavl.NewMutableTree(db.NewMemDB(), 0, false) - if err != nil { - t.Fatal(err) - } - for k, v := range sz.Data { - tree.Set([]byte(k), v) - } - icp, err := iavlproofs.CreateNonMembershipProof(tree, []byte(sz.Key)) - if err != nil { - return - } - if icp == nil { - panic("nil CommitmentProof with nil error") - } - }) -} diff --git a/go.mod b/go.mod index 73e6a4a1ff68..1e3a5341c1c8 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,6 @@ require ( github.com/cosmos/btcutil v1.0.4 github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a - github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220820010601-dc361be9e3ff github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.2 github.com/cosmos/iavl v0.19.3 @@ -126,7 +125,7 @@ require ( github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo v1.16.4 // indirect github.com/onsi/gomega v1.20.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect diff --git a/go.sum b/go.sum index 6ebb0528a17e..e827564001cc 100644 --- a/go.sum +++ b/go.sum @@ -189,8 +189,6 @@ github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dy github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a h1:2humuGPw3O5riJVFq/E2FRjF57UrO97W1qJcGVmK+6k= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a/go.mod h1:c8IO23vgNxueCCJlSI9awQtcxsvc+buzaeThB85qfBU= -github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220820010601-dc361be9e3ff h1:bK16sWoQcV03WnZiX9ljUWumWEzMFB3SWpZ0uKhIiXQ= -github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220820010601-dc361be9e3ff/go.mod h1:oY2d/HzjjpHVVNlz5quA0is2Zj/v1CI7mu4bkgMg2Yc= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -304,6 +302,7 @@ github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -633,6 +632,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1048,6 +1048,7 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1158,6 +1159,7 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= diff --git a/go.work.example b/go.work.example index 60ddf15344ca..e5deca6ce161 100644 --- a/go.work.example +++ b/go.work.example @@ -5,12 +5,11 @@ use ( ./api ./client/v2 ./core - ./cosmovisor + ./tools/cosmovisor ./depinject ./errors ./math ./orm - ./store/tools/ics23 ./tx ./simapp ./tests diff --git a/store/tools/ics23/Makefile b/store/tools/ics23/Makefile deleted file mode 100644 index 3ee116d9c2eb..000000000000 --- a/store/tools/ics23/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -GO_RUN= go run -mod=readonly -GENDIR ?= ./testdata - -.PHONY: testgen testgen-iavl testgen-smt testgen-simple - -# make sure we turn on go modules -export GO111MODULE := on - -# Usage: GENDIR=/path/to/ics23/testdata/iavl make testgen-iavl - -testgen: testgen-iavl testgen-smt testgen-simple - -testgen-iavl: - @mkdir -p "$(GENDIR)" - $(GO_RUN) ./iavl/cmd/testgen-iavl exist left 987 > "$(GENDIR)"/exist_left.json - $(GO_RUN) ./iavl/cmd/testgen-iavl exist middle 812 > "$(GENDIR)"/exist_middle.json - $(GO_RUN) ./iavl/cmd/testgen-iavl exist right 1261 > "$(GENDIR)"/exist_right.json - $(GO_RUN) ./iavl/cmd/testgen-iavl nonexist left 813 > "$(GENDIR)"/nonexist_left.json - $(GO_RUN) ./iavl/cmd/testgen-iavl nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - $(GO_RUN) ./iavl/cmd/testgen-iavl nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - $(GO_RUN) ./iavl/cmd/testgen-iavl batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - $(GO_RUN) ./iavl/cmd/testgen-iavl batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json - -testgen-smt: - @mkdir -p "$(GENDIR)" - $(GO_RUN) ./smt/cmd/testgen-smt exist left 987 > "$(GENDIR)"/exist_left.json - $(GO_RUN) ./smt/cmd/testgen-smt exist middle 812 > "$(GENDIR)"/exist_middle.json - $(GO_RUN) ./smt/cmd/testgen-smt exist right 1261 > "$(GENDIR)"/exist_right.json - $(GO_RUN) ./smt/cmd/testgen-smt nonexist left 813 > "$(GENDIR)"/nonexist_left.json - $(GO_RUN) ./smt/cmd/testgen-smt nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - $(GO_RUN) ./smt/cmd/testgen-smt nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - $(GO_RUN) ./smt/cmd/testgen-smt batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - $(GO_RUN) ./smt/cmd/testgen-smt batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json - -testgen-simple: - @mkdir -p "$(GENDIR)" - $(GO_RUN) ./tendermint/cmd/testgen-simple exist left 987 > "$(GENDIR)"/exist_left.json - $(GO_RUN) ./tendermint/cmd/testgen-simple exist middle 812 > "$(GENDIR)"/exist_middle.json - $(GO_RUN) ./tendermint/cmd/testgen-simple exist right 1261 > "$(GENDIR)"/exist_right.json - $(GO_RUN) ./tendermint/cmd/testgen-simple nonexist left 813 > "$(GENDIR)"/nonexist_left.json - $(GO_RUN) ./tendermint/cmd/testgen-simple nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - $(GO_RUN) ./tendermint/cmd/testgen-simple nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - $(GO_RUN) ./tendermint/cmd/testgen-simple batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - $(GO_RUN) ./tendermint/cmd/testgen-simple batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/go.mod b/store/tools/ics23/go.mod deleted file mode 100644 index 6af79f351aec..000000000000 --- a/store/tools/ics23/go.mod +++ /dev/null @@ -1,43 +0,0 @@ -module github.com/cosmos/cosmos-sdk/store/tools/ics23 - -go 1.19 - -require ( - github.com/confio/ics23/go v0.7.0 - github.com/cosmos/cosmos-sdk v0.46.2 - github.com/cosmos/iavl v0.19.2-0.20220916140702-9b6be3095313 - github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 - github.com/tendermint/tendermint v0.37.0-alpha.2 - github.com/tendermint/tm-db v0.6.7 -) - -require ( - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cosmos/gogoproto v1.4.2 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.0.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect - github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.15.9 // indirect - github.com/onsi/ginkgo v1.16.4 // indirect - github.com/onsi/gomega v1.20.0 // indirect - github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect - golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect - google.golang.org/protobuf v1.28.1 // indirect -) - -replace github.com/cosmos/cosmos-sdk/store/tools/ics23 => ./ diff --git a/store/tools/ics23/go.sum b/store/tools/ics23/go.sum deleted file mode 100644 index 50fd6f4f4f7c..000000000000 --- a/store/tools/ics23/go.sum +++ /dev/null @@ -1,210 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -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.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= -github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -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/cosmos/cosmos-sdk v0.46.2 h1:3dUNqbLas94ud5aTcJKCwxVOmNXpuGBtVQTMrYczTwY= -github.com/cosmos/cosmos-sdk v0.46.2/go.mod h1:0aUPGPU6PWaDEaHNjtgrpNhgxo9bAUrQ7BO7XCvFOfs= -github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAYw= -github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= -github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.2-0.20220916140702-9b6be3095313 h1:R7CnaI/0OLwOusy7n9750n8fqQ3yCQ8OJQI2L3ws9RA= -github.com/cosmos/iavl v0.19.2-0.20220916140702-9b6be3095313/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -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= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 h1:nDOkLO7klmnEw1s4AyKt1Arvpgyh33uj1JmkYlJaDsk= -github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554/go.mod h1:9+Pb2/tg1PvEgW7aFx4bFhDE4bvbI03zuJ8kb7nJ9Jc= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -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/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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tendermint/tendermint v0.37.0-alpha.2 h1:G82quAWZUDYMTc9G7b/tntFATfm7nm6PrsvjsuMZDPI= -github.com/tendermint/tendermint v0.37.0-alpha.2/go.mod h1:DSnBfCufF48DhIpmU2inmVo8YiEGus6uInwf46Iu01k= -github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= -github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg= -golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/store/tools/ics23/helpers.go b/store/tools/ics23/helpers.go deleted file mode 100644 index bb2fe62939ef..000000000000 --- a/store/tools/ics23/helpers.go +++ /dev/null @@ -1,62 +0,0 @@ -package ics23_tools - -import ( - "fmt" - "strconv" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" -) - -func ParseArgs(args []string) (exist bool, loc tmproofs.Where, size int, err error) { - if len(args) != 3 && len(args) != 4 { - err = fmt.Errorf("Insufficient args") - return - } - - switch args[1] { - case "exist": - exist = true - case "nonexist": - exist = false - default: - err = fmt.Errorf("Invalid arg: %s", args[1]) - return - } - - switch args[2] { - case "left": - loc = tmproofs.Left - case "middle": - loc = tmproofs.Middle - case "right": - loc = tmproofs.Right - default: - err = fmt.Errorf("Invalid arg: %s", args[2]) - return - } - - size = 400 - if len(args) == 4 { - size, err = strconv.Atoi(args[3]) - } - - return -} - -func ParseBatchArgs(args []string) (size int, exist int, nonexist int, err error) { - if len(args) != 3 { - err = fmt.Errorf("Insufficient args") - return - } - - size, err = strconv.Atoi(args[0]) - if err != nil { - return - } - exist, err = strconv.Atoi(args[1]) - if err != nil { - return - } - nonexist, err = strconv.Atoi(args[2]) - return -} diff --git a/store/tools/ics23/iavl/Makefile b/store/tools/ics23/iavl/Makefile deleted file mode 100644 index 0cb48a0edf7c..000000000000 --- a/store/tools/ics23/iavl/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -.PHONY: testgen - -GENDIR ?= ./testdata - -# make sure we turn on go modules -export GO111MODULE := on - -# Usage: GENDIR=../ics23/testdata/iavl make testgen -testgen: - @mkdir -p "$(GENDIR)" - go run -mod=readonly ./cmd/testgen-iavl exist left 987 > "$(GENDIR)"/exist_left.json - go run -mod=readonly ./cmd/testgen-iavl exist middle 812 > "$(GENDIR)"/exist_middle.json - go run -mod=readonly ./cmd/testgen-iavl exist right 1261 > "$(GENDIR)"/exist_right.json - go run -mod=readonly ./cmd/testgen-iavl nonexist left 813 > "$(GENDIR)"/nonexist_left.json - go run -mod=readonly ./cmd/testgen-iavl nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - go run -mod=readonly ./cmd/testgen-iavl nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - go run -mod=readonly ./cmd/testgen-iavl batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - go run -mod=readonly ./cmd/testgen-iavl batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/iavl/README.md b/store/tools/ics23/iavl/README.md deleted file mode 100644 index 756f04871079..000000000000 --- a/store/tools/ics23/iavl/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Proofs IAVL - -This is a demo project to show converting proofs from cosmos/iavl into the format -specified in confio/proofs and validating that they still work. - -## Library usage - -It exposes a two main functions : - -`func CreateMembershipProof(tree *iavl.MutableTree, key []byte) (*proofs.CommitmentProof, error)` -produces a CommitmentProof that the given key exists in the iavl tree (and contains the -current value). This returns an error if the key does not exist in the tree. - -`func CreateNonMembershipProof(tree *iavl.MutableTree, key []byte) (*proofs.CommitmentProof, error)` -produces a CommitmentProof that the given key doesn't exist in the iavl tree. -This returns an error if the key exists in the tree. - -Generalized range proofs are lower in priority, as they are just an optimization of the -two basic proof types, and don't provide any additional capabilities. -We will soon add some `Batch` capabilities that can represent these. - -## CLI usage - -We also expose a simple script to generate test data for the confio proofs package. - -```shell -go install ./cmd/testgen-iavl -testgen-iavl -``` - -Will output some json data, from a randomly generated merkle tree each time. - -```json -{ - "existence": "0a146f65436a684273735a34567543774b567a435963121e76616c75655f666f725f6f65436a684273735a34567543774b567a4359631a0d0a0b0801180120012a030002021a2d122b08011204020402201a2120d307032505383dee34ea9eadf7649c31d1ce294b6d62b273d804da478ac161da1a2d122b08011204040802201a2120306b7d51213bd93bac17c5ee3d727ec666300370b19fd55cc13d7341dc589a991a2b12290801122508160220857103d59863ac55d1f34008a681f837c01975a223c0f54883a05a446d49c7c6201a2b1229080112250a2202204498eb5c93e40934bc8bad9626f19e333c1c0be4541b9098f139585c3471bae2201a2d122b080112040e6c02201a212022648db12dbf830485cc41435ecfe37bcac26c6c305ac4304f649977ddc339d51a2c122a0801122610c60102204e0b7996a7104f5b1ac1a2caa0704c4b63f60112e0e13763b2ba03f40a54e845201a2c122a08011226129003022017858e28e0563f7252eaca19acfc1c3828c892e635f76f971b3fbdc9bbd2742e20", - "root": "cea07656c77e8655521f4c904730cf4649242b8e482be786b2b220a15150d5f0" -} -``` - -`"root"` is the hex-encoded root hash of the merkle tree - -`"existence"` is the hex-encoding of the protobuf binary encoding of a `proofs.ExistenceProof` object. This contains a (key, value) pair, -along with all steps to reach the root hash. This provides a non-trivial test case, to ensure client in multiple languages can verify the -protobuf proofs we generate from the iavl tree diff --git a/store/tools/ics23/iavl/cmd/testgen-iavl/main.go b/store/tools/ics23/iavl/cmd/testgen-iavl/main.go deleted file mode 100644 index 615a24b513ce..000000000000 --- a/store/tools/ics23/iavl/cmd/testgen-iavl/main.go +++ /dev/null @@ -1,201 +0,0 @@ -package main - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "os" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - tools "github.com/cosmos/cosmos-sdk/store/tools/ics23" - iavlproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl/helpers" -) - -/** -testgen-iavl will generate a json struct on stdout (meant to be saved to file for testdata). -this will be an auto-generated existence proof in the form: - -{ - "root": "", - "key": "", - "value": " (empty on non-existence)", - "proof": "" -} - -It accepts two or three arguments (optional size: default 400) - - testgen-iavl [exist|nonexist] [left|right|middle] - -If you make a batch, we have a different format: - -{ - "root": "", - "proof": "", - "items": [{ - "key": "", - "value": " (empty on non-existence)", - }, ...] -} - -The batch variant accepts 5 arguments: - - testgen-iavl [batch] [size] [num exist] [num nonexist] -**/ - -func main() { - if len(os.Args) < 2 { - fmt.Println("Usage: testgen-iavl batch [size] [# exist] [# nonexist]") - fmt.Println(" testgen-iavl [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - if os.Args[1] == "batch" { - err := doBatch(os.Args[2:]) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-iavl [batch] [size] [# exist] [# nonexist]") - os.Exit(1) - } - return - } - - exist, loc, size, err := tools.ParseArgs(os.Args) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-iavl [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - tree, allkeys, err := helpers.BuildTree(size) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-iavl [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - root, _ := tree.WorkingHash() - - var key, value []byte - if exist { - key = helpers.GetKey(allkeys, loc) - value, _ = tree.Get(key) - } else { - key = helpers.GetNonKey(allkeys, loc) - } - - var proof *ics23.CommitmentProof - if exist { - proof, err = iavlproofs.CreateMembershipProof(tree, key) - } else { - proof, err = iavlproofs.CreateNonMembershipProof(tree, key) - } - if err != nil { - fmt.Printf("Error: create proof: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "key": hex.EncodeToString(key), - "value": hex.EncodeToString(value), - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) -} - -type item struct { - Key string `json:"key"` - Value string `json:"value"` -} - -func doBatch(args []string) error { - size, exist, nonexist, err := tools.ParseBatchArgs(args) - if err != nil { - return err - } - - tree, allkeys, err := helpers.BuildTree(size) - if err != nil { - return err - } - root, err := tree.WorkingHash() - if err != nil { - return err - } - - items := []item{} - proofs := []*ics23.CommitmentProof{} - - for i := 0; i < exist; i++ { - key := []byte(helpers.GetKey(allkeys, tmproofs.Middle)) - value, err := tree.Get(key) - if err != nil { - return err - } - proof, err := iavlproofs.CreateMembershipProof(tree, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - Value: hex.EncodeToString(value), - } - items = append(items, item) - } - - for i := 0; i < nonexist; i++ { - key := []byte(helpers.GetNonKey(allkeys, tmproofs.Middle)) - proof, err := iavlproofs.CreateNonMembershipProof(tree, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - } - items = append(items, item) - } - - // combine all proofs into batch and compress - proof, err := ics23.CombineProofs(proofs) - if err != nil { - fmt.Printf("Error: combine proofs: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "items": items, - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) - - return nil -} diff --git a/store/tools/ics23/iavl/convert.go b/store/tools/ics23/iavl/convert.go deleted file mode 100644 index 029b542eb50b..000000000000 --- a/store/tools/ics23/iavl/convert.go +++ /dev/null @@ -1,98 +0,0 @@ -package iavlproofs - -import ( - "fmt" - - ics23 "github.com/confio/ics23/go" - "github.com/cosmos/iavl" -) - -// convertExistenceProof will convert the given proof into a valid -// existence proof, if that's what it is. -// -// This is the simplest case of the range proof and we will focus on -// demoing compatibility here -func convertExistenceProof(p *iavl.RangeProof, key, value []byte) (*ics23.ExistenceProof, error) { - if len(p.Leaves) != 1 { - return nil, fmt.Errorf("Existence proof requires RangeProof to have exactly one leaf") - } - return &ics23.ExistenceProof{ - Key: key, - Value: value, - Leaf: convertLeafOp(p.Leaves[0].Version), - Path: convertInnerOps(p.LeftPath), - }, nil -} - -func convertLeafOp(version int64) *ics23.LeafOp { - // this is adapted from iavl/proof.go:proofLeafNode.Hash() - prefix := aminoVarInt(0) - prefix = append(prefix, aminoVarInt(1)...) - prefix = append(prefix, aminoVarInt(version)...) - - return &ics23.LeafOp{ - Hash: ics23.HashOp_SHA256, - PrehashValue: ics23.HashOp_SHA256, - Length: ics23.LengthOp_VAR_PROTO, - Prefix: prefix, - } -} - -// we cannot get the proofInnerNode type, so we need to do the whole path in one function -func convertInnerOps(path iavl.PathToLeaf) []*ics23.InnerOp { - steps := make([]*ics23.InnerOp, 0, len(path)) - - // lengthByte is the length prefix prepended to each of the sha256 sub-hashes - var lengthByte byte = 0x20 - - // we need to go in reverse order, iavl starts from root to leaf, - // we want to go up from the leaf to the root - for i := len(path) - 1; i >= 0; i-- { - // this is adapted from iavl/proof.go:proofInnerNode.Hash() - prefix := aminoVarInt(int64(path[i].Height)) - prefix = append(prefix, aminoVarInt(path[i].Size)...) - prefix = append(prefix, aminoVarInt(path[i].Version)...) - - var suffix []byte - if len(path[i].Left) > 0 { - // length prefixed left side - prefix = append(prefix, lengthByte) - prefix = append(prefix, path[i].Left...) - // prepend the length prefix for child - prefix = append(prefix, lengthByte) - } else { - // prepend the length prefix for child - prefix = append(prefix, lengthByte) - // length-prefixed right side - suffix = []byte{lengthByte} - suffix = append(suffix, path[i].Right...) - } - - op := &ics23.InnerOp{ - Hash: ics23.HashOp_SHA256, - Prefix: prefix, - Suffix: suffix, - } - steps = append(steps, op) - } - return steps -} - -func aminoVarInt(orig int64) []byte { - // amino-specific byte swizzling - i := uint64(orig) << 1 - if orig < 0 { - i = ^i - } - - // avoid multiple allocs for normal case - res := make([]byte, 0, 8) - - // standard protobuf encoding - for i >= 1<<7 { - res = append(res, uint8(i&0x7f|0x80)) - i >>= 7 - } - res = append(res, uint8(i)) - return res -} diff --git a/store/tools/ics23/iavl/convert_test.go b/store/tools/ics23/iavl/convert_test.go deleted file mode 100644 index 50952a1eaca7..000000000000 --- a/store/tools/ics23/iavl/convert_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package iavlproofs - -import ( - "bytes" - "testing" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl/helpers" -) - -func TestConvertExistence(t *testing.T) { - proof, err := helpers.GenerateIavlResult(200, tmproofs.Middle) - if err != nil { - t.Fatal(err) - } - - converted, err := convertExistenceProof(proof.Proof, proof.Key, proof.Value) - if err != nil { - t.Fatal(err) - } - - calc, err := converted.Calculate() - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(calc, proof.RootHash) { - t.Errorf("Calculated: %X\nExpected: %X", calc, proof.RootHash) - } -} diff --git a/store/tools/ics23/iavl/create.go b/store/tools/ics23/iavl/create.go deleted file mode 100644 index b1d046983721..000000000000 --- a/store/tools/ics23/iavl/create.go +++ /dev/null @@ -1,102 +0,0 @@ -package iavlproofs - -import ( - "fmt" - - ics23 "github.com/confio/ics23/go" - "github.com/cosmos/iavl" -) - -// IavlSpec constrains the format from ics23-iavl (iavl merkle ics23) -var IavlSpec = &ics23.ProofSpec{ - LeafSpec: &ics23.LeafOp{ - Prefix: []byte{0}, - Hash: ics23.HashOp_SHA256, - PrehashValue: ics23.HashOp_SHA256, - Length: ics23.LengthOp_VAR_PROTO, - }, - InnerSpec: &ics23.InnerSpec{ - ChildOrder: []int32{0, 1}, - MinPrefixLength: 4, - MaxPrefixLength: 12, - ChildSize: 33, // (with length byte) - Hash: ics23.HashOp_SHA256, - }, -} - -/* -CreateMembershipProof will produce a CommitmentProof that the given key (and queries value) exists in the iavl tree. -If the key doesn't exist in the tree, this will return an error. -*/ -func CreateMembershipProof(tree *iavl.MutableTree, key []byte) (*ics23.CommitmentProof, error) { - exist, err := createExistenceProof(tree, key) - if err != nil { - return nil, err - } - proof := &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Exist{ - Exist: exist, - }, - } - return proof, nil -} - -/* -CreateNonMembershipProof will produce a CommitmentProof that the given key doesn't exist in the iavl tree. -If the key exists in the tree, this will return an error. -*/ -func CreateNonMembershipProof(tree *iavl.MutableTree, key []byte) (*ics23.CommitmentProof, error) { - // idx is one node right of what we want.... - idx, val, err := tree.GetWithIndex(key) - if err != nil { - return nil, err - } - if val != nil { - return nil, fmt.Errorf("Cannot create NonExistanceProof when Key in State") - } - - nonexist := &ics23.NonExistenceProof{ - Key: key, - } - - if idx >= 1 { - leftkey, _, err := tree.GetByIndex(idx - 1) - if err != nil { - return nil, err - } - nonexist.Left, err = createExistenceProof(tree, leftkey) - if err != nil { - return nil, err - } - } - - // this will be nil if nothing right of the queried key - rightkey, _, err := tree.GetByIndex(idx) - if err != nil { - return nil, err - } - if rightkey != nil { - nonexist.Right, err = createExistenceProof(tree, rightkey) - if err != nil { - return nil, err - } - } - - proof := &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Nonexist{ - Nonexist: nonexist, - }, - } - return proof, nil -} - -func createExistenceProof(tree *iavl.MutableTree, key []byte) (*ics23.ExistenceProof, error) { - value, proof, err := tree.GetWithProof(key) - if err != nil { - return nil, err - } - if value == nil { - return nil, fmt.Errorf("Cannot create ExistanceProof when Key not in State") - } - return convertExistenceProof(proof, key, value) -} diff --git a/store/tools/ics23/iavl/create_test.go b/store/tools/ics23/iavl/create_test.go deleted file mode 100644 index 1a1f29561612..000000000000 --- a/store/tools/ics23/iavl/create_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package iavlproofs - -import ( - "testing" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl/helpers" -) - -func TestCreateMembership(t *testing.T) { - cases := map[string]struct { - size int - loc tmproofs.Where - }{ - "small left": {size: 100, loc: tmproofs.Left}, - "small middle": {size: 100, loc: tmproofs.Middle}, - "small right": {size: 100, loc: tmproofs.Right}, - "big left": {size: 5431, loc: tmproofs.Left}, - "big middle": {size: 5431, loc: tmproofs.Middle}, - "big right": {size: 5431, loc: tmproofs.Right}, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, allkeys, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - key := helpers.GetKey(allkeys, tc.loc) - val, err := tree.Get(key) - proof, err := CreateMembershipProof(tree, key) - if err != nil { - t.Fatalf("Creating Proof: %+v", err) - } - - root, _ := tree.WorkingHash() - valid := ics23.VerifyMembership(IavlSpec, root, proof, key, val) - if !valid { - t.Fatalf("Membership Proof Invalid") - } - }) - } -} - -func TestCreateNonMembership(t *testing.T) { - cases := map[string]struct { - size int - loc tmproofs.Where - }{ - "small left": {size: 100, loc: tmproofs.Left}, - "small middle": {size: 100, loc: tmproofs.Middle}, - "small right": {size: 100, loc: tmproofs.Right}, - "big left": {size: 5431, loc: tmproofs.Left}, - "big middle": {size: 5431, loc: tmproofs.Middle}, - "big right": {size: 5431, loc: tmproofs.Right}, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, allkeys, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - key := helpers.GetNonKey(allkeys, tc.loc) - - proof, err := CreateNonMembershipProof(tree, key) - if err != nil { - t.Fatalf("Creating Proof: %+v", err) - } - - root, _ := tree.WorkingHash() - valid := ics23.VerifyNonMembership(IavlSpec, root, proof, key) - if !valid { - t.Fatalf("Non Membership Proof Invalid") - } - }) - } -} diff --git a/store/tools/ics23/iavl/helpers/helpers.go b/store/tools/ics23/iavl/helpers/helpers.go deleted file mode 100644 index 4f41600b65ea..000000000000 --- a/store/tools/ics23/iavl/helpers/helpers.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Package helpers contains functions to build sample data for tests/testgen - -In it's own package to avoid polluting the godoc for ics23-iavl -*/ -package helpers - -import ( - "bytes" - "fmt" - "sort" - - "github.com/cosmos/iavl" - "github.com/tendermint/tendermint/libs/rand" - db "github.com/tendermint/tm-db" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" -) - -// IavlResult is the result of one match -type IavlResult struct { - Key []byte - Value []byte - Proof *iavl.RangeProof - RootHash []byte -} - -// GenerateIavlResult makes a tree of size and returns a range proof for one random element -// -// returns a range proof and the root hash of the tree -func GenerateIavlResult(size int, loc tmproofs.Where) (*IavlResult, error) { - tree, allkeys, err := BuildTree(size) - if err != nil { - return nil, err - } - key := GetKey(allkeys, loc) - - value, proof, err := tree.GetWithProof(key) - if err != nil { - return nil, err - } - if value == nil { - return nil, fmt.Errorf("GetWithProof returned nil value") - } - if len(proof.Leaves) != 1 { - return nil, fmt.Errorf("GetWithProof returned %d leaves", len(proof.Leaves)) - } - root, _ := tree.WorkingHash() - - res := &IavlResult{ - Key: key, - Value: value, - Proof: proof, - RootHash: root, - } - return res, nil -} - -// GetKey returns a key, on Left/Right/Middle -func GetKey(allkeys [][]byte, loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return allkeys[0] - } - if loc == tmproofs.Right { - return allkeys[len(allkeys)-1] - } - // select a random index between 1 and allkeys-2 - idx := rand.NewRand().Int()%(len(allkeys)-2) + 1 - return allkeys[idx] -} - -// GetNonKey returns a missing key - Left of all, Right of all, or in the Middle -func GetNonKey(allkeys [][]byte, loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return []byte{0, 0, 0, 1} - } - if loc == tmproofs.Right { - return []byte{0xff, 0xff, 0xff, 0xff} - } - // otherwise, next to an existing key (copy before mod) - key := append([]byte{}, GetKey(allkeys, loc)...) - key[len(key)-2] = 255 - key[len(key)-1] = 255 - return key -} - -// BuildTree creates random key/values and stores in tree -// returns a list of all keys in sorted order -func BuildTree(size int) (tree *iavl.MutableTree, keys [][]byte, err error) { - tree, err = iavl.NewMutableTree(db.NewMemDB(), 0) - if err != nil { - return nil, nil, err - } - - // insert lots of info and store the bytes - keys = make([][]byte, size) - for i := 0; i < size; i++ { - key := rand.Str(20) - value := "value_for_" + key - tree.Set([]byte(key), []byte(value)) - keys[i] = []byte(key) - } - sort.Slice(keys, func(i, j int) bool { - return bytes.Compare(keys[i], keys[j]) < 0 - }) - - return tree, keys, nil -} diff --git a/store/tools/ics23/smt/Makefile b/store/tools/ics23/smt/Makefile deleted file mode 100644 index 83d10db73ba2..000000000000 --- a/store/tools/ics23/smt/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.PHONY: build test testgen - -GENDIR ?= ./testdata - -# make sure we turn on go modules -export GO111MODULE := on - -build: - go build -mod=readonly ./cmd/testgen-smt - -test: - go test -mod=readonly . - -# Usage: GENDIR=../ics23/testdata/smt make testgen -testgen: - @mkdir -p "$(GENDIR)" - go run -mod=readonly ./cmd/testgen-smt exist left 987 > "$(GENDIR)"/exist_left.json - go run -mod=readonly ./cmd/testgen-smt exist middle 812 > "$(GENDIR)"/exist_middle.json - go run -mod=readonly ./cmd/testgen-smt exist right 1261 > "$(GENDIR)"/exist_right.json - go run -mod=readonly ./cmd/testgen-smt nonexist left 813 > "$(GENDIR)"/nonexist_left.json - go run -mod=readonly ./cmd/testgen-smt nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - go run -mod=readonly ./cmd/testgen-smt nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - go run -mod=readonly ./cmd/testgen-smt batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - go run -mod=readonly ./cmd/testgen-smt batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/smt/README.md b/store/tools/ics23/smt/README.md deleted file mode 100644 index 82c06eddcbf1..000000000000 --- a/store/tools/ics23/smt/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Proofs SMT - -This project demonstrates the generation and validation of ICS-23 proofs for a sparse Merkle tree (SMT) as implemented by [Celestia](https://github.com/celestiaorg/smt). - -## Library usage - -It exposes a two main functions : - -`func CreateMembershipProof(tree *smt.SparseMerkleTree, key []byte) (*ics23.CommitmentProof, error)` -produces a CommitmentProof that the given key exists in the SMT (and contains the current value). This returns an error if the key does not exist in the tree. - -`func CreateNonMembershipProof(tree *smt.SparseMerkleTree, key []byte, preimages PreimageMap) (*ics23.CommitmentProof, error)` -produces a CommitmentProof that the given key doesn't exist in the SMT. This returns an error if the key exists in the tree. -This relies on an auxiliary `PreimageMap` object which provides access to the preimages of all keys in the tree based on their (hashed) path ordering. - - -## CLI usage - -We also expose a simple script to generate test data for the confio proofs package. - -```shell -go install ./cmd/testgen-smt -testgen-smt exist left 10 -``` - -Will output some json data, from a randomly generated Merkle tree each time. - -```json -{ - "key": "574f516c4364415274743845444d397347484937", - "proof": "0a9d010a2024910c64b5b74b6b72e6b9d3310a1d0bd599032e05e8abc43112d194e1a78f30121e76616c75655f666f725f574f516c4364415274743845444d3973474849371a07080118012a0100222708011201011a20b51557119b6985d54a48a4510e528d5f929f0b1c8b57914bb6cd8f9eab035d75222708011201011a20fff8248ca9e98cbb05c81612d38e74780b2c02d9c88ee628cfbdb8ca44769a63", - "root": "f69ef3599b7f0471b61735490636608a8ff43a327b2b5a3a5528ca7f7059ffa5", - "value": "76616c75655f666f725f574f516c4364415274743845444d397347484937" -} -``` - -`"root"` is the hex-encoded root hash of the Merkle tree. - -`"proof"` is the hex-encoding of the protobuf binary encoding of a `proofs.ExistenceProof` object. This contains a (key, value) pair, along with all steps to reach the root hash. This provides a non-trivial test case, to ensure clients in multiple languages can verify the protobuf proofs we generate from the SMT. diff --git a/store/tools/ics23/smt/cmd/testgen-smt/main.go b/store/tools/ics23/smt/cmd/testgen-smt/main.go deleted file mode 100644 index e2afe2ff0913..000000000000 --- a/store/tools/ics23/smt/cmd/testgen-smt/main.go +++ /dev/null @@ -1,214 +0,0 @@ -package main - -import ( - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "os" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - tools "github.com/cosmos/cosmos-sdk/store/tools/ics23" - smtproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt/helpers" -) - -/** -testgen-smt will generate a json struct on stdout (meant to be saved to file for testdata). -this will be an auto-generated existence proof in the form: - -{ - "root": "", - "key": "", - "value": " (empty on non-existence)", - "proof": "" -} - -It accepts two or three arguments (optional size: default 400) - - testgen-smt [exist|nonexist] [left|right|middle] - -If you make a batch, we have a different format: - -{ - "root": "", - "proof": "", - "items": [{ - "key": "", - "value": " (empty on non-existence)", - }, ...] -} - -The batch variant accepts 5 arguments: - - testgen-smt [batch] [size] [num exist] [num nonexist] -**/ - -func main() { - if len(os.Args) < 2 { - fmt.Println("Usage: testgen-smt batch [size] [# exist] [# nonexist]") - fmt.Println(" testgen-smt [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - if os.Args[1] == "batch" { - size, exist, nonexist, err := tools.ParseBatchArgs(os.Args[2:]) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-smt batch [size] [# exist] [# nonexist]") - os.Exit(1) - } - err = doBatch(size, exist, nonexist) - if err != nil { - fmt.Printf("Error: %+v\n", err) - os.Exit(1) - } - return - } - - exist, loc, size, err := tools.ParseArgs(os.Args) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-smt [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - err = doSingle(exist, loc, size) - if err != nil { - fmt.Printf("Error: %+v\n", err) - os.Exit(1) - } -} - -func doSingle(exist bool, loc tmproofs.Where, size int) error { - tree, preim, err := helpers.BuildTree(size) - if err != nil { - return err - } - root := tree.Root() - - var key, value []byte - if exist { - key = preim.GetKey(loc) - value, err = tree.Get(key) - if err != nil { - return fmt.Errorf("get key: %w", err) - } - } else { - key = preim.GetNonKey(loc) - } - - var proof *ics23.CommitmentProof - if exist { - proof, err = smtproofs.CreateMembershipProof(tree, key) - } else { - proof, err = smtproofs.CreateNonMembershipProof(tree, key, preim) - } - if err != nil { - return fmt.Errorf("create proof: %w", err) - } - - binary, err := proof.Marshal() - if err != nil { - return fmt.Errorf("protobuf marshal: %w", err) - } - - path := sha256.Sum256(key) - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "key": hex.EncodeToString(path[:]), - "value": hex.EncodeToString(value), - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - return fmt.Errorf("json encoding: %w", err) - } - - fmt.Println(string(out)) - return nil -} - -type item struct { - Key string `json:"key"` - Value string `json:"value"` -} - -func pickWhere(i int) tmproofs.Where { - if i > 2 { - return tmproofs.Middle - } - return tmproofs.Where(i) -} - -func doBatch(size, exist, nonexist int) error { - tree, preim, err := helpers.BuildTree(size) - if err != nil { - return err - } - root := tree.Root() - - items := []item{} - proofs := []*ics23.CommitmentProof{} - - for i := 0; i < exist; i++ { - where := pickWhere(i) - key := []byte(preim.GetKey(where)) - value, err := tree.Get(key) - if err != nil { - return fmt.Errorf("get key: %w", err) - } - proof, err := smtproofs.CreateMembershipProof(tree, key) - if err != nil { - return fmt.Errorf("create proof: %w", err) - } - proofs = append(proofs, proof) - path := sha256.Sum256(key) - item := item{ - Key: hex.EncodeToString(path[:]), - Value: hex.EncodeToString(value), - } - items = append(items, item) - } - - for i := 0; i < nonexist; i++ { - where := pickWhere(i) - key := []byte(preim.GetNonKey(where)) - proof, err := smtproofs.CreateNonMembershipProof(tree, key, preim) - if err != nil { - return fmt.Errorf("create proof: %w", err) - } - proofs = append(proofs, proof) - path := sha256.Sum256(key) - item := item{ - Key: hex.EncodeToString(path[:]), - } - items = append(items, item) - } - - // combine all proofs into batch and compress - proof, err := ics23.CombineProofs(proofs) - if err != nil { - return fmt.Errorf("combine proofs: %w", err) - } - - binary, err := proof.Marshal() - if err != nil { - return fmt.Errorf("protobuf marshal: %w", err) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "items": items, - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - return fmt.Errorf("json encoding: %w", err) - } - - fmt.Println(string(out)) - - return nil -} diff --git a/store/tools/ics23/smt/create.go b/store/tools/ics23/smt/create.go deleted file mode 100644 index 47e1024ef4ef..000000000000 --- a/store/tools/ics23/smt/create.go +++ /dev/null @@ -1,126 +0,0 @@ -package smtproofs - -import ( - "crypto/sha256" - "fmt" - - ics23 "github.com/confio/ics23/go" - "github.com/lazyledger/smt" -) - -// PreimageMap represents an interface for accessing hashed tree paths and retrieving their -// corresponding preimages. -type PreimageMap interface { - // KeyFor returns the preimage (key) for given path index. - KeyFor(int) []byte - // FindPath returns the ordered index of a given path, and whether it's contained in the tree. - // If not found, the returned index is where the path would be inserted. - FindPath([32]byte) (int, bool) - // Len returns the number of mapped paths. - Len() int -} - -// CreateMembershipProof will produce a CommitmentProof that the given key (and queries value) exists in the SMT. -// If the key doesn't exist in the tree, this will return an error. -func CreateMembershipProof(tree *smt.SparseMerkleTree, key []byte) (*ics23.CommitmentProof, error) { - exist, err := createExistenceProof(tree, key) - if err != nil { - return nil, err - } - proof := &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Exist{ - Exist: exist, - }, - } - return proof, nil -} - -func createExistenceProof(tree *smt.SparseMerkleTree, key []byte) (*ics23.ExistenceProof, error) { - has, err := tree.Has(key) - if err != nil { - return nil, err - } - if !has { - return nil, fmt.Errorf("Cannot create ExistenceProof when key not in state") - } - value, err := tree.Get(key) - if err != nil { - return nil, err - } - proof, err := tree.Prove(key) - if err != nil { - return nil, err - } - path := sha256.Sum256(key) - return &ics23.ExistenceProof{ - Key: path[:], - Value: value, - Leaf: ics23.SmtSpec.LeafSpec, - Path: convertInnerOps(path[:], proof.SideNodes), - }, nil -} - -// CreateNonMembershipProof will produce a CommitmentProof that the given key doesn't exist in the SMT. -// If the key exists in the tree, this will return an error. -func CreateNonMembershipProof(tree *smt.SparseMerkleTree, key []byte, preimages PreimageMap) (*ics23.CommitmentProof, error) { - path := sha256.Sum256(key) - has, err := tree.Has(key) - if err != nil { - return nil, err - } - if has { - return nil, fmt.Errorf("Cannot create NonExistenceProof when key in state") - } - nonexist := &ics23.NonExistenceProof{ - Key: path[:], - } - ix, found := preimages.FindPath(path) - if found { - return nil, fmt.Errorf("Found index for key not in state") - } - if ix > 0 { - nonexist.Left, err = createExistenceProof(tree, preimages.KeyFor(ix-1)) - if err != nil { - return nil, err - } - } - if ix < preimages.Len() { - nonexist.Right, err = createExistenceProof(tree, preimages.KeyFor(ix)) - if err != nil { - return nil, err - } - } - return &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Nonexist{ - nonexist, - }, - }, nil -} - -func convertInnerOps(path []byte, sideNodes [][]byte) []*ics23.InnerOp { - depth := len(sideNodes) - inners := make([]*ics23.InnerOp, 0, depth) - for i := 0; i < len(sideNodes); i++ { - op := &ics23.InnerOp{ - Hash: ics23.HashOp_SHA256, - Prefix: []byte{1}, - } - if getBitAtFromMSB(path[:], depth-1-i) == 1 { - // right child is on path - op.Prefix = append(op.Prefix, sideNodes[i]...) - } else { - op.Suffix = sideNodes[i] - } - inners = append(inners, op) - } - return inners -} - -// getBitAtFromMSB gets the bit at an offset from the most significant bit -// Copied from github.com/celestiaorg/smt -func getBitAtFromMSB(data []byte, position int) int { - if int(data[position/8])&(1<<(8-1-uint(position)%8)) > 0 { - return 1 - } - return 0 -} diff --git a/store/tools/ics23/smt/create_test.go b/store/tools/ics23/smt/create_test.go deleted file mode 100644 index 71ec7722661e..000000000000 --- a/store/tools/ics23/smt/create_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package smtproofs - -import ( - "crypto/sha256" - "testing" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt/helpers" -) - -var ( - numKeys = 50 - cases = map[string]struct { - size int - loc tmproofs.Where - }{ - "tiny left": {size: 10, loc: tmproofs.Left}, - "tiny middle": {size: 10, loc: tmproofs.Middle}, - "tiny right": {size: 10, loc: tmproofs.Right}, - "small left": {size: 100, loc: tmproofs.Left}, - "small middle": {size: 100, loc: tmproofs.Middle}, - "small right": {size: 100, loc: tmproofs.Right}, - "big left": {size: 5431, loc: tmproofs.Left}, - "big middle": {size: 5431, loc: tmproofs.Middle}, - "big right": {size: 5431, loc: tmproofs.Right}, - } -) - -func TestCreateMembership(t *testing.T) { - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, preim, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - for i := 0; i < numKeys; i++ { - key := preim.GetKey(tc.loc) - val, err := tree.Get(key) - if err != nil { - t.Fatalf("Getting key: %+v", err) - } - proof, err := CreateMembershipProof(tree, key) - if err != nil { - t.Fatalf("Creating proof: %+v", err) - } - - root := tree.Root() - path := sha256.Sum256(key) - valid := ics23.VerifyMembership(ics23.SmtSpec, root, proof, path[:], val) - if !valid { - t.Fatalf("Membership proof invalid") - } - } - }) - } -} - -func TestCreateNonMembership(t *testing.T) { - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, preim, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - - for i := 0; i < numKeys; i++ { - key := preim.GetNonKey(tc.loc) - proof, err := CreateNonMembershipProof(tree, key, preim) - if err != nil { - t.Fatalf("Creating proof: %+v", err) - } - - root := tree.Root() - path := sha256.Sum256(key) - valid := ics23.VerifyNonMembership(ics23.SmtSpec, root, proof, path[:]) - if !valid { - t.Fatalf("Non-membership proof invalid") - } - } - }) - } -} diff --git a/store/tools/ics23/smt/helpers/helpers.go b/store/tools/ics23/smt/helpers/helpers.go deleted file mode 100644 index d444c47d61ec..000000000000 --- a/store/tools/ics23/smt/helpers/helpers.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Package helpers contains functions to build sample data for tests/testgen - -In it's own package to avoid polluting the godoc for ics23-smt -*/ -package helpers - -import ( - "bytes" - "crypto/sha256" - "math/rand" - "sort" - - "github.com/lazyledger/smt" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" -) - -// PreimageMap maps each tree path back to its preimage -// needed because SparseMerkleTree methods take preimage as arg and hash internally -type PreimageMap struct { - paths []preimageMapping - keys [][]byte - // known non-keys at left and rightmost positions - nonKeys []preimageMapping -} -type preimageMapping struct { - path [32]byte - keyIdx int // index of preimage in keys list -} - -// BuildTree creates random key/values and stores in tree -// returns a list of all keys in sorted order -func BuildTree(size int) (*smt.SparseMerkleTree, *PreimageMap, error) { - nodes, values := smt.NewSimpleMap(), smt.NewSimpleMap() - tree := smt.NewSparseMerkleTree(nodes, values, sha256.New()) - - // insert lots of info and store the bytes - keys := make([][]byte, size+2) - for i := 0; i < len(keys); i++ { - key := randStr(20) - - value := "value_for_" + key - _, err := tree.Update([]byte(key), []byte(value)) - if err != nil { - return nil, nil, err - } - keys[i] = []byte(key) - } - - var paths []preimageMapping - for i, key := range keys { - paths = append(paths, preimageMapping{sha256.Sum256(key), i}) - } - sort.Slice(paths, func(i, j int) bool { - return bytes.Compare(paths[i].path[:], paths[j].path[:]) < 0 - }) - - // now, find the edge paths and remove them from the tree - leftmost, rightmost := paths[0], paths[len(paths)-1] - _, err := tree.Delete(keys[leftmost.keyIdx]) - if err != nil { - return nil, nil, err - } - _, err = tree.Delete(keys[rightmost.keyIdx]) - if err != nil { - return nil, nil, err - } - - pim := PreimageMap{ - keys: keys, - paths: paths[1 : len(paths)-1], - nonKeys: []preimageMapping{leftmost, rightmost}, - } - return tree, &pim, nil -} - -// FindPath returns the closest index to path in paths, and whether it's a match. -// If not found, the returned index is where the path would be. -func (pim PreimageMap) FindPath(path [32]byte) (int, bool) { - var mid int - from, to := 0, len(pim.paths)-1 - for from <= to { - mid = (from + to) / 2 - switch bytes.Compare(pim.paths[mid].path[:], path[:]) { - case -1: - from = mid + 1 - case 1: - to = mid - 1 - default: - return mid, true - } - } - return from, false -} - -// Len returns the number of mapped paths. -func (pim PreimageMap) Len() int { return len(pim.paths) } - -// KeyFor returns the preimage (key) for given path index. -func (pim PreimageMap) KeyFor(pathIx int) []byte { - return pim.keys[pim.paths[pathIx].keyIdx] -} - -// GetKey this returns a key, on Left/Right/Middle -func (pim PreimageMap) GetKey(loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return pim.KeyFor(0) - } - if loc == tmproofs.Right { - return pim.KeyFor(len(pim.paths) - 1) - } - // select a random index between 1 and len-2 - idx := rand.Int()%(len(pim.paths)-2) + 1 - return pim.KeyFor(idx) -} - -// GetNonKey returns a missing key - Left of all, Right of all, or in the Middle -func (pim PreimageMap) GetNonKey(loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return pim.keys[pim.nonKeys[0].keyIdx] - } - if loc == tmproofs.Right { - return pim.keys[pim.nonKeys[1].keyIdx] - } - // otherwise, next to an existing key (copy before mod) - key := append([]byte{}, pim.GetKey(tmproofs.Middle)...) - key[len(key)-2] = 255 - key[len(key)-1] = 255 - return key -} diff --git a/store/tools/ics23/smt/helpers/random.go b/store/tools/ics23/smt/helpers/random.go deleted file mode 100644 index 85a963c9e2a0..000000000000 --- a/store/tools/ics23/smt/helpers/random.go +++ /dev/null @@ -1,34 +0,0 @@ -package helpers - -import ( - crand "crypto/rand" - "encoding/binary" - "fmt" - rand "math/rand" -) - -const ( - strChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" -) - -func init() { - rand.Seed(42) - // rand.Seed(crandSeed()) -} - -func randStr(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = strChars[rand.Intn(len(strChars))] - } - return string(b) -} - -func crandSeed() int64 { - var seed int64 - err := binary.Read(crand.Reader, binary.BigEndian, &seed) - if err != nil { - panic(fmt.Sprintf("could not read random seed from crypto/rand: %v", err)) - } - return seed -} diff --git a/store/tools/ics23/tendermint/Makefile b/store/tools/ics23/tendermint/Makefile deleted file mode 100644 index 5d355d1ff47c..000000000000 --- a/store/tools/ics23/tendermint/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.PHONY: build test testgen - -GENDIR ?= ./testdata - -# make sure we turn on go modules -export GO111MODULE := on - -build: - go build -mod=readonly ./cmd/testgen-simple - -test: - go test -mod=readonly . - -testgen: - # Usage: GENDIR=../ics23/testdata/tendermint make testgen - @mkdir -p "$(GENDIR)" - go run -mod=readonly ./cmd/testgen-simple exist left 987 > "$(GENDIR)"/exist_left.json - go run -mod=readonly ./cmd/testgen-simple exist middle 812 > "$(GENDIR)"/exist_middle.json - go run -mod=readonly ./cmd/testgen-simple exist right 1261 > "$(GENDIR)"/exist_right.json - go run -mod=readonly ./cmd/testgen-simple nonexist left 813 > "$(GENDIR)"/nonexist_left.json - go run -mod=readonly ./cmd/testgen-simple nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - go run -mod=readonly ./cmd/testgen-simple nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - go run -mod=readonly ./cmd/testgen-simple batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - go run -mod=readonly ./cmd/testgen-simple batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/tendermint/README.md b/store/tools/ics23/tendermint/README.md deleted file mode 100644 index 09d85ccdc953..000000000000 --- a/store/tools/ics23/tendermint/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Proofs Tendermint - -This is an adapter library to convert the `SimpleProof` from -[tendermint/crypto/merkle](https://github.com/tendermint/tendermint/tree/master/crypto/merkle) -into the standard confio/proofs format. - -As non-existence proofs depend on ordered keys, and all proofs require the key-value pair -to be encoded in a predictable format in the leaves, we will only support proofs generated -from `SimpleProofsFromMap`, which handles the key-value pairs for leafs in a standard format. - -## Library usage - -It exposes a top-level function `func ConvertSimpleProof(p *merkle.SimpleProof, key, value []byte) (*proofs.ExistenceProof, error)` -that can convert from `merkle.SimpleProof` with the KVPair encoding for leafs, into confio/proof protobuf objects. - -It currently only works for existence proofs. We plan to soon support non-existence proofs. - -## CLI usage - -We also expose a simple script to generate test data for the confio proofs package. - -```shell -make testgen -``` - -Will output some json data, from a randomly generated merkle tree each time. - -```json -{ - "existence": "0a146f65436a684273735a34567543774b567a435963121e76616c75655f666f725f6f65436a684273735a34567543774b567a4359631a0d0a0b0801180120012a030002021a2d122b08011204020402201a2120d307032505383dee34ea9eadf7649c31d1ce294b6d62b273d804da478ac161da1a2d122b08011204040802201a2120306b7d51213bd93bac17c5ee3d727ec666300370b19fd55cc13d7341dc589a991a2b12290801122508160220857103d59863ac55d1f34008a681f837c01975a223c0f54883a05a446d49c7c6201a2b1229080112250a2202204498eb5c93e40934bc8bad9626f19e333c1c0be4541b9098f139585c3471bae2201a2d122b080112040e6c02201a212022648db12dbf830485cc41435ecfe37bcac26c6c305ac4304f649977ddc339d51a2c122a0801122610c60102204e0b7996a7104f5b1ac1a2caa0704c4b63f60112e0e13763b2ba03f40a54e845201a2c122a08011226129003022017858e28e0563f7252eaca19acfc1c3828c892e635f76f971b3fbdc9bbd2742e20", - "root": "cea07656c77e8655521f4c904730cf4649242b8e482be786b2b220a15150d5f0" -} -``` - -`"root"` is the hex-encoded root hash of the merkle tree - -`"existence"` is the hex-encoding of the protobuf binary encoding of a `proofs.ExistenceProof` object. This contains a (key, value) pair, -along with all steps to reach the root hash. This provides a non-trivial test case, to ensure client in multiple languages can verify the -protobuf proofs we generate from the iavl tree diff --git a/store/tools/ics23/tendermint/cmd/testgen-simple/main.go b/store/tools/ics23/tendermint/cmd/testgen-simple/main.go deleted file mode 100644 index b5fb104ebb60..000000000000 --- a/store/tools/ics23/tendermint/cmd/testgen-simple/main.go +++ /dev/null @@ -1,241 +0,0 @@ -package main - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "os" - "strconv" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - - ics23 "github.com/confio/ics23/go" -) - -/** -testgen-simple will generate a json struct on stdout (meant to be saved to file for testdata). -this will be an auto-generated existence proof in the form: - -{ - "root": "", - "key": "", - "value": " (empty on non-existence)", - "proof": "" -} - -It accepts two or three arguments (optional size: default 400) - - testgen-simple [exist|nonexist] [left|right|middle] - -If you make a batch, we have a different format: - -{ - "root": "", - "proof": "", - "items": [{ - "key": "", - "value": " (empty on non-existence)", - }, ...] -} - -The batch variant accepts 5 arguments: - - testgen-simple [batch] [size] [num exist] [num nonexist] -**/ - -func main() { - if len(os.Args) < 2 { - fmt.Println("Usage: testgen-simple batch [size] [# exist] [# nonexist]") - fmt.Println(" testgen-simple [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - if os.Args[1] == "batch" { - err := doBatch(os.Args[2:]) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-simple [batch] [size] [# exist] [# nonexist]") - os.Exit(1) - } - return - } - - exist, loc, size, err := parseArgs(os.Args) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-simple [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - data := tmproofs.BuildMap(size) - allkeys := tmproofs.SortedKeys(data) - root := tmproofs.CalcRoot(data) - - var key, value []byte - if exist { - key = []byte(tmproofs.GetKey(allkeys, loc)) - value = data[string(key)] - } else { - key = []byte(tmproofs.GetNonKey(allkeys, loc)) - } - - var proof *ics23.CommitmentProof - if exist { - proof, err = tmproofs.CreateMembershipProof(data, key) - } else { - proof, err = tmproofs.CreateNonMembershipProof(data, key) - } - if err != nil { - fmt.Printf("Error: create proof: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "key": hex.EncodeToString(key), - "value": hex.EncodeToString(value), - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) -} - -func parseArgs(args []string) (exist bool, loc tmproofs.Where, size int, err error) { - if len(args) != 3 && len(args) != 4 { - err = fmt.Errorf("Insufficient args") - return - } - - switch args[1] { - case "exist": - exist = true - case "nonexist": - exist = false - default: - err = fmt.Errorf("Invalid arg: %s", args[1]) - return - } - - switch args[2] { - case "left": - loc = tmproofs.Left - case "middle": - loc = tmproofs.Middle - case "right": - loc = tmproofs.Right - default: - err = fmt.Errorf("Invalid arg: %s", args[2]) - return - } - - size = 400 - if len(args) == 4 { - size, err = strconv.Atoi(args[3]) - } - - return -} - -type item struct { - Key string `json:"key"` - Value string `json:"value"` -} - -func doBatch(args []string) error { - size, exist, nonexist, err := parseBatchArgs(args) - if err != nil { - return err - } - - data := tmproofs.BuildMap(size) - allkeys := tmproofs.SortedKeys(data) - root := tmproofs.CalcRoot(data) - - items := []item{} - proofs := []*ics23.CommitmentProof{} - - for i := 0; i < exist; i++ { - key := []byte(tmproofs.GetKey(allkeys, tmproofs.Middle)) - value := data[string(key)] - proof, err := tmproofs.CreateMembershipProof(data, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - Value: hex.EncodeToString(value), - } - items = append(items, item) - } - - for i := 0; i < nonexist; i++ { - key := []byte(tmproofs.GetNonKey(allkeys, tmproofs.Middle)) - proof, err := tmproofs.CreateNonMembershipProof(data, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - } - items = append(items, item) - } - - // combine all proofs into batch and compress - proof, err := ics23.CombineProofs(proofs) - if err != nil { - fmt.Printf("Error: combine proofs: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "items": items, - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) - - return nil -} - -func parseBatchArgs(args []string) (size int, exist int, nonexist int, err error) { - if len(args) != 3 { - err = fmt.Errorf("Insufficient args") - return - } - - size, err = strconv.Atoi(args[0]) - if err != nil { - return - } - exist, err = strconv.Atoi(args[1]) - if err != nil { - return - } - nonexist, err = strconv.Atoi(args[2]) - return -} diff --git a/cosmovisor/.gitignore b/tools/cosmovisor/.gitignore similarity index 100% rename from cosmovisor/.gitignore rename to tools/cosmovisor/.gitignore diff --git a/cosmovisor/.goreleaser.yml b/tools/cosmovisor/.goreleaser.yml similarity index 100% rename from cosmovisor/.goreleaser.yml rename to tools/cosmovisor/.goreleaser.yml diff --git a/cosmovisor/CHANGELOG.md b/tools/cosmovisor/CHANGELOG.md similarity index 96% rename from cosmovisor/CHANGELOG.md rename to tools/cosmovisor/CHANGELOG.md index e9e24249bbd1..d5e0a9c81e5e 100644 --- a/cosmovisor/CHANGELOG.md +++ b/tools/cosmovisor/CHANGELOG.md @@ -36,6 +36,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## v1.4.0 2022-10-21 + +### API Breaking Changes + +* [#13603](https://github.com/cosmos-sdk/pull/13603) Rename cosmovisor package to `cosmossdk.io/tools/cosmovisor`. + ## v1.3.0 2022-09-11 ### Improvements diff --git a/cosmovisor/Makefile b/tools/cosmovisor/Makefile similarity index 100% rename from cosmovisor/Makefile rename to tools/cosmovisor/Makefile diff --git a/cosmovisor/README.md b/tools/cosmovisor/README.md similarity index 99% rename from cosmovisor/README.md rename to tools/cosmovisor/README.md index afaf25c38d98..cca08691b638 100644 --- a/cosmovisor/README.md +++ b/tools/cosmovisor/README.md @@ -49,7 +49,7 @@ You can download Cosmovisor from the [GitHub releases](https://github.com/cosmos To install the latest version of `cosmovisor`, run the following command: ```shell -go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest +go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest ``` To install a previous version, you can specify the version. IMPORTANT: Chains that use Cosmos-SDK v0.44.3 or earlier (eg v0.44.2) and want to use auto-download feature MUST use `cosmovisor v0.1.0` diff --git a/tools/cosmovisor/RELEASE_NOTES.md b/tools/cosmovisor/RELEASE_NOTES.md new file mode 100644 index 000000000000..c8f9d2e44dc8 --- /dev/null +++ b/tools/cosmovisor/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +# Cosmovisor v1.4.0 Release Notes + +* Rename cosmovisor package to `cosmossdk.io/tools/cosmovisor`. + +### Changelog + +For more details, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/cosmovisor/v1.4.0/cosmovisor/CHANGELOG.md). diff --git a/cosmovisor/args.go b/tools/cosmovisor/args.go similarity index 99% rename from cosmovisor/args.go rename to tools/cosmovisor/args.go index 59345705dfcd..6913529c1675 100644 --- a/cosmovisor/args.go +++ b/tools/cosmovisor/args.go @@ -10,7 +10,7 @@ import ( "strings" "time" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + cverrors "cosmossdk.io/tools/cosmovisor/errors" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/rs/zerolog" diff --git a/cosmovisor/args_test.go b/tools/cosmovisor/args_test.go similarity index 99% rename from cosmovisor/args_test.go rename to tools/cosmovisor/args_test.go index ed7a11cfe579..1121cd32dddf 100644 --- a/cosmovisor/args_test.go +++ b/tools/cosmovisor/args_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + "cosmossdk.io/tools/cosmovisor/errors" ) type argsTestSuite struct { diff --git a/cosmovisor/buffer_test.go b/tools/cosmovisor/buffer_test.go similarity index 100% rename from cosmovisor/buffer_test.go rename to tools/cosmovisor/buffer_test.go diff --git a/cosmovisor/cmd/cosmovisor/help.go b/tools/cosmovisor/cmd/cosmovisor/help.go similarity index 95% rename from cosmovisor/cmd/cosmovisor/help.go rename to tools/cosmovisor/cmd/cosmovisor/help.go index dfaee7073061..cc4f38c50218 100644 --- a/cosmovisor/cmd/cosmovisor/help.go +++ b/tools/cosmovisor/cmd/cosmovisor/help.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" ) // GetHelpText creates the help text multi-line string. diff --git a/cosmovisor/cmd/cosmovisor/help_test.go b/tools/cosmovisor/cmd/cosmovisor/help_test.go similarity index 98% rename from cosmovisor/cmd/cosmovisor/help_test.go rename to tools/cosmovisor/cmd/cosmovisor/help_test.go index 3332cc777dd0..1b66b226cdfc 100644 --- a/cosmovisor/cmd/cosmovisor/help_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/help_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" ) type HelpTestSuite struct { diff --git a/cosmovisor/cmd/cosmovisor/init.go b/tools/cosmovisor/cmd/cosmovisor/init.go similarity index 97% rename from cosmovisor/cmd/cosmovisor/init.go rename to tools/cosmovisor/cmd/cosmovisor/init.go index db06caa02297..6f2ea6770c9e 100644 --- a/cosmovisor/cmd/cosmovisor/init.go +++ b/tools/cosmovisor/cmd/cosmovisor/init.go @@ -10,8 +10,8 @@ import ( "github.com/rs/zerolog" "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/cosmovisor" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + "cosmossdk.io/tools/cosmovisor" + cverrors "cosmossdk.io/tools/cosmovisor/errors" ) func init() { diff --git a/cosmovisor/cmd/cosmovisor/init_test.go b/tools/cosmovisor/cmd/cosmovisor/init_test.go similarity index 99% rename from cosmovisor/cmd/cosmovisor/init_test.go rename to tools/cosmovisor/cmd/cosmovisor/init_test.go index 7733bd2ae879..471721b67738 100644 --- a/cosmovisor/cmd/cosmovisor/init_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/init_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" ) type InitTestSuite struct { diff --git a/cosmovisor/cmd/cosmovisor/main.go b/tools/cosmovisor/cmd/cosmovisor/main.go similarity index 73% rename from cosmovisor/cmd/cosmovisor/main.go rename to tools/cosmovisor/cmd/cosmovisor/main.go index 628b7da4f7f5..e032b28270bb 100644 --- a/cosmovisor/cmd/cosmovisor/main.go +++ b/tools/cosmovisor/cmd/cosmovisor/main.go @@ -4,8 +4,8 @@ import ( "context" "os" - "github.com/cosmos/cosmos-sdk/cosmovisor" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + "cosmossdk.io/tools/cosmovisor" + cverrors "cosmossdk.io/tools/cosmovisor/errors" ) func main() { diff --git a/cosmovisor/cmd/cosmovisor/root.go b/tools/cosmovisor/cmd/cosmovisor/root.go similarity index 100% rename from cosmovisor/cmd/cosmovisor/root.go rename to tools/cosmovisor/cmd/cosmovisor/root.go diff --git a/cosmovisor/cmd/cosmovisor/run.go b/tools/cosmovisor/cmd/cosmovisor/run.go similarity index 97% rename from cosmovisor/cmd/cosmovisor/run.go rename to tools/cosmovisor/cmd/cosmovisor/run.go index 8128533161a1..904628df82ad 100644 --- a/cosmovisor/cmd/cosmovisor/run.go +++ b/tools/cosmovisor/cmd/cosmovisor/run.go @@ -1,7 +1,7 @@ package main import ( - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" "github.com/rs/zerolog" "github.com/spf13/cobra" ) diff --git a/cosmovisor/cmd/cosmovisor/run_config.go b/tools/cosmovisor/cmd/cosmovisor/run_config.go similarity index 100% rename from cosmovisor/cmd/cosmovisor/run_config.go rename to tools/cosmovisor/cmd/cosmovisor/run_config.go diff --git a/cosmovisor/cmd/cosmovisor/run_test.go b/tools/cosmovisor/cmd/cosmovisor/run_test.go similarity index 100% rename from cosmovisor/cmd/cosmovisor/run_test.go rename to tools/cosmovisor/cmd/cosmovisor/run_test.go diff --git a/cosmovisor/cmd/cosmovisor/version.go b/tools/cosmovisor/cmd/cosmovisor/version.go similarity index 97% rename from cosmovisor/cmd/cosmovisor/version.go rename to tools/cosmovisor/cmd/cosmovisor/version.go index 0651da67250e..2a0bb5673c78 100644 --- a/cosmovisor/cmd/cosmovisor/version.go +++ b/tools/cosmovisor/cmd/cosmovisor/version.go @@ -6,7 +6,7 @@ import ( "runtime/debug" "strings" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" "github.com/rs/zerolog" "github.com/spf13/cobra" ) diff --git a/cosmovisor/cmd/cosmovisor/version_test.go b/tools/cosmovisor/cmd/cosmovisor/version_test.go similarity index 91% rename from cosmovisor/cmd/cosmovisor/version_test.go rename to tools/cosmovisor/cmd/cosmovisor/version_test.go index f9dfa1401443..b44be81c82f8 100644 --- a/cosmovisor/cmd/cosmovisor/version_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/version_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" "github.com/cosmos/cosmos-sdk/testutil" "github.com/stretchr/testify/require" ) diff --git a/cosmovisor/errors/multi.go b/tools/cosmovisor/errors/multi.go similarity index 100% rename from cosmovisor/errors/multi.go rename to tools/cosmovisor/errors/multi.go diff --git a/cosmovisor/errors/multi_test.go b/tools/cosmovisor/errors/multi_test.go similarity index 100% rename from cosmovisor/errors/multi_test.go rename to tools/cosmovisor/errors/multi_test.go diff --git a/cosmovisor/go.mod b/tools/cosmovisor/go.mod similarity index 99% rename from cosmovisor/go.mod rename to tools/cosmovisor/go.mod index b7e9142b55c6..bc735432fa33 100644 --- a/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -1,4 +1,4 @@ -module github.com/cosmos/cosmos-sdk/cosmovisor +module cosmossdk.io/tools/cosmovisor go 1.19 diff --git a/cosmovisor/go.sum b/tools/cosmovisor/go.sum similarity index 100% rename from cosmovisor/go.sum rename to tools/cosmovisor/go.sum diff --git a/cosmovisor/logger.go b/tools/cosmovisor/logger.go similarity index 100% rename from cosmovisor/logger.go rename to tools/cosmovisor/logger.go diff --git a/cosmovisor/process.go b/tools/cosmovisor/process.go similarity index 100% rename from cosmovisor/process.go rename to tools/cosmovisor/process.go diff --git a/cosmovisor/process_test.go b/tools/cosmovisor/process_test.go similarity index 99% rename from cosmovisor/process_test.go rename to tools/cosmovisor/process_test.go index 1beadecc7e78..ea9b3621f10a 100644 --- a/cosmovisor/process_test.go +++ b/tools/cosmovisor/process_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) diff --git a/cosmovisor/scanner.go b/tools/cosmovisor/scanner.go similarity index 100% rename from cosmovisor/scanner.go rename to tools/cosmovisor/scanner.go diff --git a/cosmovisor/scanner_test.go b/tools/cosmovisor/scanner_test.go similarity index 100% rename from cosmovisor/scanner_test.go rename to tools/cosmovisor/scanner_test.go diff --git a/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod similarity index 100% rename from cosmovisor/testdata/download/cosmovisor/genesis/bin/autod rename to tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod diff --git a/cosmovisor/testdata/download/data/.gitkeep b/tools/cosmovisor/testdata/download/data/.gitkeep similarity index 100% rename from cosmovisor/testdata/download/data/.gitkeep rename to tools/cosmovisor/testdata/download/data/.gitkeep diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod similarity index 100% rename from cosmovisor/testdata/repo/chain2-zip_bin/autod rename to tools/cosmovisor/testdata/repo/chain2-zip_bin/autod diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip similarity index 100% rename from cosmovisor/testdata/repo/chain2-zip_bin/autod.zip rename to tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip diff --git a/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip b/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip similarity index 100% rename from cosmovisor/testdata/repo/chain3-zip_dir/autod.zip rename to tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip diff --git a/cosmovisor/testdata/repo/chain3-zip_dir/bin/autod b/tools/cosmovisor/testdata/repo/chain3-zip_dir/bin/autod similarity index 100% rename from cosmovisor/testdata/repo/chain3-zip_dir/bin/autod rename to tools/cosmovisor/testdata/repo/chain3-zip_dir/bin/autod diff --git a/cosmovisor/testdata/repo/raw_binary/autod b/tools/cosmovisor/testdata/repo/raw_binary/autod similarity index 100% rename from cosmovisor/testdata/repo/raw_binary/autod rename to tools/cosmovisor/testdata/repo/raw_binary/autod diff --git a/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json similarity index 100% rename from cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json rename to tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json diff --git a/cosmovisor/testdata/repo/zip_directory/autod.zip b/tools/cosmovisor/testdata/repo/zip_directory/autod.zip similarity index 100% rename from cosmovisor/testdata/repo/zip_directory/autod.zip rename to tools/cosmovisor/testdata/repo/zip_directory/autod.zip diff --git a/cosmovisor/testdata/upgrade-files/f1-good.json b/tools/cosmovisor/testdata/upgrade-files/f1-good.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f1-good.json rename to tools/cosmovisor/testdata/upgrade-files/f1-good.json diff --git a/cosmovisor/testdata/upgrade-files/f2-bad-type-2.json b/tools/cosmovisor/testdata/upgrade-files/f2-bad-type-2.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f2-bad-type-2.json rename to tools/cosmovisor/testdata/upgrade-files/f2-bad-type-2.json diff --git a/cosmovisor/testdata/upgrade-files/f2-bad-type.json b/tools/cosmovisor/testdata/upgrade-files/f2-bad-type.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f2-bad-type.json rename to tools/cosmovisor/testdata/upgrade-files/f2-bad-type.json diff --git a/cosmovisor/testdata/upgrade-files/f2-normalized-name.json b/tools/cosmovisor/testdata/upgrade-files/f2-normalized-name.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f2-normalized-name.json rename to tools/cosmovisor/testdata/upgrade-files/f2-normalized-name.json diff --git a/cosmovisor/testdata/upgrade-files/f3-empty.json b/tools/cosmovisor/testdata/upgrade-files/f3-empty.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f3-empty.json rename to tools/cosmovisor/testdata/upgrade-files/f3-empty.json diff --git a/cosmovisor/testdata/upgrade-files/f4-empty-obj.json b/tools/cosmovisor/testdata/upgrade-files/f4-empty-obj.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f4-empty-obj.json rename to tools/cosmovisor/testdata/upgrade-files/f4-empty-obj.json diff --git a/cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json b/tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json rename to tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json diff --git a/cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json b/tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json rename to tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json diff --git a/cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd diff --git a/cosmovisor/testdata/validate/data/.gitkeep b/tools/cosmovisor/testdata/validate/data/.gitkeep similarity index 100% rename from cosmovisor/testdata/validate/data/.gitkeep rename to tools/cosmovisor/testdata/validate/data/.gitkeep diff --git a/cosmovisor/upgrade.go b/tools/cosmovisor/upgrade.go similarity index 100% rename from cosmovisor/upgrade.go rename to tools/cosmovisor/upgrade.go diff --git a/cosmovisor/upgrade_test.go b/tools/cosmovisor/upgrade_test.go similarity index 99% rename from cosmovisor/upgrade_test.go rename to tools/cosmovisor/upgrade_test.go index 13ad4669d289..7187ce7bd5ab 100644 --- a/cosmovisor/upgrade_test.go +++ b/tools/cosmovisor/upgrade_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) diff --git a/x/gov/README.md b/x/gov/README.md index 757cc25c43d1..2ab24cfb48e7 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -321,7 +321,7 @@ Once a block contains more than 2/3rd *precommits* where a common nodes, non-validating full nodes and light-nodes) are expected to switch to the new version of the software. -Validators and full nodes can use an automation tool, such as [Cosmovisor](https://github.com/cosmos/cosmos-sdk/blob/main/cosmovisor/README.md), for automatically switching version of the chain. +Validators and full nodes can use an automation tool, such as [Cosmovisor](https://github.com/cosmos/cosmos-sdk/blob/main/tools/cosmovisor/README.md), for automatically switching version of the chain. # State diff --git a/x/upgrade/README.md b/x/upgrade/README.md index fea951323661..7e682fb4bcb2 100644 --- a/x/upgrade/README.md +++ b/x/upgrade/README.md @@ -45,7 +45,7 @@ automatically upgrade to. If an operator running the application binary also runs a sidecar process to assist in the automatic download and upgrade of a binary, the `Info` allows this process to -be seamless. This tool is [Cosmovisor](https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor#readme). +be seamless. This tool is [Cosmovisor](https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor#readme). ```go type Plan struct { From e2792711ba890607db2542e6d0671d9f8e753659 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Oct 2022 12:44:58 -0400 Subject: [PATCH 3/8] build(deps): Bump cosmossdk.io/depinject from 1.0.0-alpha.2 to 1.0.0-alpha.3 in /tests (#13596) * build(deps): Bump cosmossdk.io/depinject in /tests Bumps [cosmossdk.io/depinject](https://github.com/cosmos/cosmos-sdk) from 1.0.0-alpha.2 to 1.0.0-alpha.3. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/orm/v1.0.0-alpha.2...orm/v1.0.0-alpha.3) --- updated-dependencies: - dependency-name: cosmossdk.io/depinject dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump cosmossdk.io/depinject from 1.0.0-alpha.2 to 1.0.0-alpha.3 in /tests for all modules * update core version * x/consensus providers need to be exported Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Aaron Craelius Co-authored-by: Aaron Craelius --- core/go.mod | 2 +- core/go.sum | 4 ++-- go.mod | 6 +++--- go.sum | 12 ++++++------ simapp/go.mod | 6 +++--- simapp/go.sum | 12 ++++++------ tests/go.mod | 6 +++--- tests/go.sum | 12 ++++++------ tx/go.mod | 2 +- x/consensus/module.go | 12 ++++++------ 10 files changed, 37 insertions(+), 37 deletions(-) diff --git a/core/go.mod b/core/go.mod index 3807e6a20b89..7d19fe125385 100644 --- a/core/go.mod +++ b/core/go.mod @@ -21,7 +21,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect golang.org/x/text v0.3.8 // indirect diff --git a/core/go.sum b/core/go.sum index d356a87c000d..eb6a29327223 100644 --- a/core/go.sum +++ b/core/go.sum @@ -39,8 +39,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= diff --git a/go.mod b/go.mod index 1e3a5341c1c8..8027c305d405 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ module github.com/cosmos/cosmos-sdk require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/core v0.2.0 - cosmossdk.io/depinject v1.0.0-alpha.2 + cosmossdk.io/core v0.3.0 + cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/errors v1.0.0-beta.7 cosmossdk.io/math v1.0.0-beta.3 github.com/99designs/keyring v1.2.1 @@ -54,7 +54,7 @@ require ( github.com/tendermint/tendermint v0.37.0-alpha.2 github.com/tendermint/tm-db v0.6.7 golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e + golang.org/x/exp v0.0.0-20221019170559-20944726eadf google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a google.golang.org/grpc v1.50.1 google.golang.org/protobuf v1.28.1 diff --git a/go.sum b/go.sum index e827564001cc..5927e92d71e0 100644 --- a/go.sum +++ b/go.sum @@ -59,10 +59,10 @@ cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.2.1 h1:4m6vIHKJygrixSIfOsD3Mhij9vZlQC/+BTeb+Un9os0= cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= -cosmossdk.io/core v0.2.0 h1:gwDzEzCX4tyegDAgmNOsVaiSKG4ILg7wo2D5KW0bhMQ= -cosmossdk.io/core v0.2.0/go.mod h1:w5HHliErOpYv2LlUPA2FYYHtElsCaf9oiXM6TM+ueZI= -cosmossdk.io/depinject v1.0.0-alpha.2 h1:pVcPnqc8bY2GCHVMj77rk6Ew7uz0K3QhrUHdqoKvO5g= -cosmossdk.io/depinject v1.0.0-alpha.2/go.mod h1:Wmu0TV/H4s4s8zaJ9YnaioLyCbqlCvMQ4xTtzJzGzvA= +cosmossdk.io/core v0.3.0 h1:ief7yWnQaXiGuhu+xcs5w8T9KHwkV2dy+tk4jck2hK8= +cosmossdk.io/core v0.3.0/go.mod h1:Pgb+291E7hq552xh1a8TsYZY1BnLpherqDSfh4KgC8I= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= @@ -875,8 +875,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/simapp/go.mod b/simapp/go.mod index 801bfaf93b8f..fde90462a31b 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -4,8 +4,8 @@ go 1.19 require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/core v0.2.0 - cosmossdk.io/depinject v1.0.0-alpha.2 + cosmossdk.io/core v0.3.0 + cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/math v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.0.0-00010101000000-000000000000 github.com/golang/mock v1.6.0 @@ -135,7 +135,7 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect diff --git a/simapp/go.sum b/simapp/go.sum index 87fd15b1df74..7ee3572850cc 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -59,10 +59,10 @@ cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.2.1 h1:4m6vIHKJygrixSIfOsD3Mhij9vZlQC/+BTeb+Un9os0= cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= -cosmossdk.io/core v0.2.0 h1:gwDzEzCX4tyegDAgmNOsVaiSKG4ILg7wo2D5KW0bhMQ= -cosmossdk.io/core v0.2.0/go.mod h1:w5HHliErOpYv2LlUPA2FYYHtElsCaf9oiXM6TM+ueZI= -cosmossdk.io/depinject v1.0.0-alpha.2 h1:pVcPnqc8bY2GCHVMj77rk6Ew7uz0K3QhrUHdqoKvO5g= -cosmossdk.io/depinject v1.0.0-alpha.2/go.mod h1:Wmu0TV/H4s4s8zaJ9YnaioLyCbqlCvMQ4xTtzJzGzvA= +cosmossdk.io/core v0.3.0 h1:ief7yWnQaXiGuhu+xcs5w8T9KHwkV2dy+tk4jck2hK8= +cosmossdk.io/core v0.3.0/go.mod h1:Pgb+291E7hq552xh1a8TsYZY1BnLpherqDSfh4KgC8I= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= @@ -863,8 +863,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/tests/go.mod b/tests/go.mod index 1590f260878d..bbed28052131 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/depinject v1.0.0-alpha.2 + cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/math v1.0.0-beta.3 cosmossdk.io/simapp v0.0.0-20220908203654-84d4bf5accad github.com/cosmos/cosmos-sdk v0.0.0-00010101000000-000000000000 @@ -23,7 +23,7 @@ require ( cloud.google.com/go/compute v1.6.1 // indirect cloud.google.com/go/iam v0.3.0 // indirect cloud.google.com/go/storage v1.14.0 // indirect - cosmossdk.io/core v0.2.0 // indirect + cosmossdk.io/core v0.3.0 // indirect cosmossdk.io/errors v1.0.0-beta.7 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -137,7 +137,7 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect diff --git a/tests/go.sum b/tests/go.sum index b6ebda34e63d..4c99da67f992 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -59,10 +59,10 @@ cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.2.1 h1:4m6vIHKJygrixSIfOsD3Mhij9vZlQC/+BTeb+Un9os0= cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= -cosmossdk.io/core v0.2.0 h1:gwDzEzCX4tyegDAgmNOsVaiSKG4ILg7wo2D5KW0bhMQ= -cosmossdk.io/core v0.2.0/go.mod h1:w5HHliErOpYv2LlUPA2FYYHtElsCaf9oiXM6TM+ueZI= -cosmossdk.io/depinject v1.0.0-alpha.2 h1:pVcPnqc8bY2GCHVMj77rk6Ew7uz0K3QhrUHdqoKvO5g= -cosmossdk.io/depinject v1.0.0-alpha.2/go.mod h1:Wmu0TV/H4s4s8zaJ9YnaioLyCbqlCvMQ4xTtzJzGzvA= +cosmossdk.io/core v0.3.0 h1:ief7yWnQaXiGuhu+xcs5w8T9KHwkV2dy+tk4jck2hK8= +cosmossdk.io/core v0.3.0/go.mod h1:Pgb+291E7hq552xh1a8TsYZY1BnLpherqDSfh4KgC8I= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= @@ -865,8 +865,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/tx/go.mod b/tx/go.mod index 51ac5b162356..f5952377a0e3 100644 --- a/tx/go.mod +++ b/tx/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/core v0.0.0-00010101000000-000000000000 + cosmossdk.io/core v0.3.0 cosmossdk.io/math v1.0.0-beta.3 github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/stretchr/testify v1.8.0 diff --git a/x/consensus/module.go b/x/consensus/module.go index 5c09fe156877..6dcef77d93ed 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -123,15 +123,15 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} func init() { appmodule.Register( &modulev1.Module{}, - appmodule.Provide(provideModuleBasic, provideModule), + appmodule.Provide(ProvideModuleBasic, ProvideModule), ) } -func provideModuleBasic() runtime.AppModuleBasicWrapper { +func ProvideModuleBasic() runtime.AppModuleBasicWrapper { return runtime.WrapAppModuleBasic(AppModuleBasic{}) } -type consensusParamInputs struct { +type ConsensusParamInputs struct { depinject.In Cdc codec.Codec @@ -140,7 +140,7 @@ type consensusParamInputs struct { Authority map[string]sdk.AccAddress `optional:"true"` } -type consensusParamOutputs struct { +type ConsensusParamOutputs struct { depinject.Out Keeper keeper.Keeper @@ -148,7 +148,7 @@ type consensusParamOutputs struct { BaseAppOption runtime.BaseAppOption } -func provideModule(in consensusParamInputs) consensusParamOutputs { +func ProvideModule(in ConsensusParamInputs) ConsensusParamOutputs { authority, ok := in.Authority[depinject.ModuleKey(in.ModuleKey).Name()] if !ok { // default to governance authority if not provided @@ -161,7 +161,7 @@ func provideModule(in consensusParamInputs) consensusParamOutputs { app.SetParamStore(&k) } - return consensusParamOutputs{ + return ConsensusParamOutputs{ Keeper: k, Module: runtime.WrapAppModule(m), BaseAppOption: baseappOpt, From ddf5cf0d8d26f8beb504cb2fcc2d4a8b0964261c Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Sat, 22 Oct 2022 23:53:24 +0530 Subject: [PATCH 4/8] feat(cli): add module-account cli cmd and grpc get api (#13612) --- CHANGELOG.md | 1 + api/cosmos/auth/v1beta1/query.pulsar.go | 2559 +++++++++++++++------- api/cosmos/auth/v1beta1/query_grpc.pb.go | 38 + proto/cosmos/auth/v1beta1/query.proto | 38 +- tests/e2e/auth/suite.go | 63 + x/auth/client/cli/query.go | 35 + x/auth/keeper/grpc_query.go | 25 + x/auth/keeper/grpc_query_test.go | 55 + x/auth/types/query.pb.go | 815 +++++-- x/auth/types/query.pb.gw.go | 101 + 10 files changed, 2717 insertions(+), 1013 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0289c0d09d..0c4b6cd0a733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [#11981](https://github.com/cosmos/cosmos-sdk/pull/11981) Create the `SetSendEnabled` endpoint for managing the bank's SendEnabled settings. * (x/auth) [#13210](https://github.com/cosmos/cosmos-sdk/pull/13210) Add `Query/AccountInfo` endpoint for simplified access to basic account info. * (x/consensus) [#12905](https://github.com/cosmos/cosmos-sdk/pull/12905) Create a new `x/consensus` module that is now responsible for maintaining Tendermint consensus parameters instead of `x/param`. Legacy types remain in order to facilitate parameter migration from the deprecated `x/params`. App developers should ensure that they execute `baseapp.MigrateParams` during their chain upgrade. These legacy types will be removed in a future release. +* (x/auth) [#13612](https://github.com/cosmos/cosmos-sdk/pull/13612) Add `Query/ModuleAccountByName` endpoint for accessing the module account info by module name. ### Improvements diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index e645b5154e9c..5f7a90427a7a 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -2,13 +2,9 @@ package authv1beta1 import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -17,6 +13,9 @@ import ( protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" ) var ( @@ -1448,23 +1447,25 @@ func (x *fastReflection_QueryAccountRequest) ProtoMethods() *protoiface.Methods } var ( - md_QueryModuleAccountsRequest protoreflect.MessageDescriptor + md_QueryAccountResponse protoreflect.MessageDescriptor + fd_QueryAccountResponse_account protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsRequest") + md_QueryAccountResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountResponse") + fd_QueryAccountResponse_account = md_QueryAccountResponse.Fields().ByName("account") } -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) -type fastReflection_QueryModuleAccountsRequest QueryModuleAccountsRequest +type fastReflection_QueryAccountResponse QueryAccountResponse -func (x *QueryModuleAccountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsRequest)(x) +func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountResponse)(x) } -func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1476,43 +1477,43 @@ func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryModuleAccountsRequest_messageType fastReflection_QueryModuleAccountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsRequest_messageType{} +var _fastReflection_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} -type fastReflection_QueryModuleAccountsRequest_messageType struct{} +type fastReflection_QueryAccountResponse_messageType struct{} -func (x fastReflection_QueryModuleAccountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsRequest)(nil) +func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountResponse)(nil) } -func (x fastReflection_QueryModuleAccountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsRequest) +func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountResponse) } -func (x fastReflection_QueryModuleAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsRequest +func (x fastReflection_QueryAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryModuleAccountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsRequest +func (x *fastReflection_QueryAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryModuleAccountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsRequest_messageType +func (x *fastReflection_QueryAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsRequest) +func (x *fastReflection_QueryAccountResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsRequest)(x) +func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1520,7 +1521,13 @@ func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryModuleAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != nil { + value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + if !f(fd_QueryAccountResponse_account, value) { + return + } + } } // Has reports whether a field is populated. @@ -1534,13 +1541,15 @@ func (x *fastReflection_QueryModuleAccountsRequest) Range(f func(protoreflect.Fi // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + return x.Account != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } @@ -1550,13 +1559,15 @@ func (x *fastReflection_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAccountResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + x.Account = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } @@ -1566,13 +1577,16 @@ func (x *fastReflection_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldD // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryModuleAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + value := x.Account + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", descriptor.FullName())) } } @@ -1586,13 +1600,15 @@ func (x *fastReflection_QueryModuleAccountsRequest) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + x.Account = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } @@ -1606,36 +1622,44 @@ func (x *fastReflection_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + if x.Account == nil { + x.Account = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryModuleAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryModuleAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountResponse", d.FullName())) } panic("unreachable") } @@ -1643,7 +1667,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) WhichOneof(d protoreflect.On // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryModuleAccountsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAccountResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1654,7 +1678,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAccountResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1666,7 +1690,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) SetUnknown(fields protorefle // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryModuleAccountsRequest) IsValid() bool { +func (x *fastReflection_QueryAccountResponse) IsValid() bool { return x != nil } @@ -1676,9 +1700,9 @@ func (x *fastReflection_QueryModuleAccountsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsRequest) + x := input.Message.Interface().(*QueryAccountResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1690,6 +1714,10 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M var n int var l int _ = l + if x.Account != nil { + l = options.Size(x.Account) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1700,7 +1728,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsRequest) + x := input.Message.Interface().(*QueryAccountResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1719,6 +1747,20 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Account != nil { + encoded, err := options.Marshal(x.Account) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1730,7 +1772,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsRequest) + x := input.Message.Interface().(*QueryAccountResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1762,12 +1804,48 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Account == nil { + x.Account = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1804,25 +1882,23 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor + md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") + md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") } -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) -type fastReflection_QueryParamsResponse QueryParamsResponse +type fastReflection_QueryParamsRequest QueryParamsRequest -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) } -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1834,43 +1910,43 @@ func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} -type fastReflection_QueryParamsResponse_messageType struct{} +type fastReflection_QueryParamsRequest_messageType struct{} -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) } -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) } -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType +func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -1878,13 +1954,7 @@ func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } +func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1898,15 +1968,804 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryParamsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "cosmos.auth.v1beta1.QueryParamsResponse.params": - return x.Params != nil + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryModuleAccountsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryModuleAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsRequest)(nil) + +type fastReflection_QueryModuleAccountsRequest QueryModuleAccountsRequest + +func (x *QueryModuleAccountsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsRequest)(x) +} + +func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryModuleAccountsRequest_messageType fastReflection_QueryModuleAccountsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsRequest_messageType{} + +type fastReflection_QueryModuleAccountsRequest_messageType struct{} + +func (x fastReflection_QueryModuleAccountsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsRequest)(nil) +} +func (x fastReflection_QueryModuleAccountsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsRequest) +} +func (x fastReflection_QueryModuleAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryModuleAccountsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryModuleAccountsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryModuleAccountsRequest) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryModuleAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } @@ -1916,15 +2775,13 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } @@ -1934,16 +2791,13 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", descriptor.FullName())) } } @@ -1957,15 +2811,13 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } @@ -1979,44 +2831,36 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsRequest", d.FullName())) } panic("unreachable") } @@ -2024,7 +2868,7 @@ func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDesc // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2035,7 +2879,7 @@ func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2047,7 +2891,7 @@ func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawF // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { +func (x *fastReflection_QueryModuleAccountsRequest) IsValid() bool { return x != nil } @@ -2057,9 +2901,9 @@ func (x *fastReflection_QueryParamsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryModuleAccountsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2071,10 +2915,6 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2085,7 +2925,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryModuleAccountsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2104,20 +2944,6 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -2129,7 +2955,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryModuleAccountsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2161,48 +2987,12 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2238,27 +3028,78 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var _ protoreflect.List = (*_QueryModuleAccountsResponse_1_list)(nil) + +type _QueryModuleAccountsResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_QueryModuleAccountsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryModuleAccountsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_QueryModuleAccountsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryModuleAccountsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryModuleAccountsResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryAccountResponse protoreflect.MessageDescriptor - fd_QueryAccountResponse_account protoreflect.FieldDescriptor + md_QueryModuleAccountsResponse protoreflect.MessageDescriptor + fd_QueryModuleAccountsResponse_accounts protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountResponse") - fd_QueryAccountResponse_account = md_QueryAccountResponse.Fields().ByName("account") + md_QueryModuleAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsResponse") + fd_QueryModuleAccountsResponse_accounts = md_QueryModuleAccountsResponse.Fields().ByName("accounts") } -var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) -type fastReflection_QueryAccountResponse QueryAccountResponse +type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse -func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(x) +func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsResponse)(x) } -func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] +func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2269,43 +3110,43 @@ func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} +var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} -type fastReflection_QueryAccountResponse_messageType struct{} +type fastReflection_QueryModuleAccountsResponse_messageType struct{} -func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(nil) +func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsResponse)(nil) } -func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) +func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsResponse) } -func (x fastReflection_QueryAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountResponse +func (x fastReflection_QueryModuleAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountResponse +func (x *fastReflection_QueryModuleAccountsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountResponse_messageType +func (x *fastReflection_QueryModuleAccountsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) +func (x *fastReflection_QueryModuleAccountsResponse) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountResponse)(x) +func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2313,10 +3154,10 @@ func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Account != nil { - value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) - if !f(fd_QueryAccountResponse_account, value) { +func (x *fastReflection_QueryModuleAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &x.Accounts}) + if !f(fd_QueryModuleAccountsResponse_accounts, value) { return } } @@ -2333,15 +3174,15 @@ func (x *fastReflection_QueryAccountResponse) Range(f func(protoreflect.FieldDes // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - return x.Account != nil + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + return len(x.Accounts) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } @@ -2351,15 +3192,15 @@ func (x *fastReflection_QueryAccountResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - x.Account = nil + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + x.Accounts = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } @@ -2369,16 +3210,19 @@ func (x *fastReflection_QueryAccountResponse) Clear(fd protoreflect.FieldDescrip // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - value := x.Account - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{}) + } + listValue := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", descriptor.FullName())) } } @@ -2392,15 +3236,17 @@ func (x *fastReflection_QueryAccountResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - x.Account = value.Message().Interface().(*anypb.Any) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + lv := value.List() + clv := lv.(*_QueryModuleAccountsResponse_1_list) + x.Accounts = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } @@ -2414,44 +3260,45 @@ func (x *fastReflection_QueryAccountResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - if x.Account == nil { - x.Account = new(anypb.Any) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + if x.Accounts == nil { + x.Accounts = []*anypb.Any{} } - return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + value := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsResponse", d.FullName())) } panic("unreachable") } @@ -2459,7 +3306,7 @@ func (x *fastReflection_QueryAccountResponse) WhichOneof(d protoreflect.OneofDes // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAccountResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2470,7 +3317,7 @@ func (x *fastReflection_QueryAccountResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2482,7 +3329,7 @@ func (x *fastReflection_QueryAccountResponse) SetUnknown(fields protoreflect.Raw // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryAccountResponse) IsValid() bool { +func (x *fastReflection_QueryModuleAccountsResponse) IsValid() bool { return x != nil } @@ -2492,9 +3339,9 @@ func (x *fastReflection_QueryAccountResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountResponse) + x := input.Message.Interface().(*QueryModuleAccountsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2506,9 +3353,11 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.Account != nil { - l = options.Size(x.Account) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Accounts) > 0 { + for _, e := range x.Accounts { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2520,7 +3369,7 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountResponse) + x := input.Message.Interface().(*QueryModuleAccountsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2539,19 +3388,21 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Account != nil { - encoded, err := options.Marshal(x.Account) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.Accounts) > 0 { + for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Accounts[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2564,7 +3415,7 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountResponse) + x := input.Message.Interface().(*QueryModuleAccountsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2596,15 +3447,15 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2631,10 +3482,8 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Account == nil { - x.Account = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); err != nil { + x.Accounts = append(x.Accounts, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2674,24 +3523,26 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryParamsRequest protoreflect.MessageDescriptor + md_QueryModuleAccountByNameRequest protoreflect.MessageDescriptor + fd_QueryModuleAccountByNameRequest_name protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") + md_QueryModuleAccountByNameRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameRequest") + fd_QueryModuleAccountByNameRequest_name = md_QueryModuleAccountByNameRequest.Fields().ByName("name") } -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameRequest)(nil) -type fastReflection_QueryParamsRequest QueryParamsRequest +type fastReflection_QueryModuleAccountByNameRequest QueryModuleAccountByNameRequest -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) +func (x *QueryModuleAccountByNameRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameRequest)(x) } -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] +func (x *QueryModuleAccountByNameRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2702,43 +3553,43 @@ func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} +var _fastReflection_QueryModuleAccountByNameRequest_messageType fastReflection_QueryModuleAccountByNameRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameRequest_messageType{} -type fastReflection_QueryParamsRequest_messageType struct{} +type fastReflection_QueryModuleAccountByNameRequest_messageType struct{} -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameRequest)(nil) } -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameRequest) } -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x *fastReflection_QueryModuleAccountByNameRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType +func (x *fastReflection_QueryModuleAccountByNameRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountByNameRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x *fastReflection_QueryModuleAccountByNameRequest) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) +func (x *fastReflection_QueryModuleAccountByNameRequest) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountByNameRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2746,7 +3597,13 @@ func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryModuleAccountByNameRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_QueryModuleAccountByNameRequest_name, value) { + return + } + } } // Has reports whether a field is populated. @@ -2760,13 +3617,15 @@ func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryModuleAccountByNameRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + return x.Name != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } @@ -2776,13 +3635,15 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountByNameRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + x.Name = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } @@ -2792,13 +3653,16 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + value := x.Name + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", descriptor.FullName())) } } @@ -2812,13 +3676,15 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountByNameRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + x.Name = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } @@ -2832,36 +3698,40 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + panic(fmt.Errorf("field name of message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountByNameRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", d.FullName())) } panic("unreachable") } @@ -2869,7 +3739,7 @@ func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountByNameRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2880,7 +3750,7 @@ func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountByNameRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2892,7 +3762,7 @@ func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFi // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { +func (x *fastReflection_QueryModuleAccountByNameRequest) IsValid() bool { return x != nil } @@ -2902,9 +3772,9 @@ func (x *fastReflection_QueryParamsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountByNameRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2916,6 +3786,10 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2926,7 +3800,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2945,6 +3819,13 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -2956,7 +3837,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2988,12 +3869,44 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3029,78 +3942,27 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_QueryModuleAccountsResponse_1_list)(nil) - -type _QueryModuleAccountsResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_QueryModuleAccountsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryModuleAccountsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_QueryModuleAccountsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryModuleAccountsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryModuleAccountsResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryModuleAccountsResponse protoreflect.MessageDescriptor - fd_QueryModuleAccountsResponse_accounts protoreflect.FieldDescriptor + md_QueryModuleAccountByNameResponse protoreflect.MessageDescriptor + fd_QueryModuleAccountByNameResponse_account protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsResponse") - fd_QueryModuleAccountsResponse_accounts = md_QueryModuleAccountsResponse.Fields().ByName("accounts") + md_QueryModuleAccountByNameResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameResponse") + fd_QueryModuleAccountByNameResponse_account = md_QueryModuleAccountByNameResponse.Fields().ByName("account") } -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameResponse)(nil) -type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse +type fastReflection_QueryModuleAccountByNameResponse QueryModuleAccountByNameResponse -func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(x) +func (x *QueryModuleAccountByNameResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameResponse)(x) } -func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] +func (x *QueryModuleAccountByNameResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3111,43 +3973,43 @@ func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} +var _fastReflection_QueryModuleAccountByNameResponse_messageType fastReflection_QueryModuleAccountByNameResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameResponse_messageType{} -type fastReflection_QueryModuleAccountsResponse_messageType struct{} +type fastReflection_QueryModuleAccountByNameResponse_messageType struct{} -func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(nil) +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameResponse)(nil) } -func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameResponse) } -func (x fastReflection_QueryModuleAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsResponse +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryModuleAccountsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsResponse +func (x *fastReflection_QueryModuleAccountByNameResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryModuleAccountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsResponse_messageType +func (x *fastReflection_QueryModuleAccountByNameResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountByNameResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountsResponse) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) +func (x *fastReflection_QueryModuleAccountByNameResponse) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsResponse)(x) +func (x *fastReflection_QueryModuleAccountByNameResponse) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountByNameResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3155,10 +4017,10 @@ func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.Pr // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryModuleAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &x.Accounts}) - if !f(fd_QueryModuleAccountsResponse_accounts, value) { +func (x *fastReflection_QueryModuleAccountByNameResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != nil { + value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + if !f(fd_QueryModuleAccountByNameResponse_account, value) { return } } @@ -3175,15 +4037,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) Range(f func(protoreflect.F // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryModuleAccountByNameResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - return len(x.Accounts) != 0 + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + return x.Account != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } @@ -3193,15 +4055,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDe // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountByNameResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - x.Accounts = nil + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + x.Account = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } @@ -3211,19 +4073,16 @@ func (x *fastReflection_QueryModuleAccountsResponse) Clear(fd protoreflect.Field // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryModuleAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{}) - } - listValue := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(listValue) + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + value := x.Account + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", descriptor.FullName())) } } @@ -3237,17 +4096,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) Get(descriptor protoreflect // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountByNameResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - lv := value.List() - clv := lv.(*_QueryModuleAccountsResponse_1_list) - x.Accounts = *clv.list + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + x.Account = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } @@ -3261,45 +4118,44 @@ func (x *fastReflection_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDe // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + if x.Account == nil { + x.Account = new(anypb.Any) } - value := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(value) + return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryModuleAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &list}) + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryModuleAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountByNameResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", d.FullName())) } panic("unreachable") } @@ -3307,7 +4163,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) WhichOneof(d protoreflect.O // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryModuleAccountsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountByNameResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3318,7 +4174,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) GetUnknown() protoreflect.R // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountByNameResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3330,7 +4186,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) SetUnknown(fields protorefl // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryModuleAccountsResponse) IsValid() bool { +func (x *fastReflection_QueryModuleAccountByNameResponse) IsValid() bool { return x != nil } @@ -3340,9 +4196,9 @@ func (x *fastReflection_QueryModuleAccountsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountByNameResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsResponse) + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3354,11 +4210,9 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. var n int var l int _ = l - if len(x.Accounts) > 0 { - for _, e := range x.Accounts { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } + if x.Account != nil { + l = options.Size(x.Account) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3370,7 +4224,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsResponse) + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3389,21 +4243,19 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Accounts) > 0 { - for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Accounts[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa + if x.Account != nil { + encoded, err := options.Marshal(x.Account) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -3416,7 +4268,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsResponse) + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3448,15 +4300,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3483,8 +4335,10 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Accounts = append(x.Accounts, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { + if x.Account == nil { + x.Account = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -3541,7 +4395,7 @@ func (x *Bech32PrefixRequest) ProtoReflect() protoreflect.Message { } func (x *Bech32PrefixRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3899,7 +4753,7 @@ func (x *Bech32PrefixResponse) ProtoReflect() protoreflect.Message { } func (x *Bech32PrefixResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4319,7 +5173,7 @@ func (x *AddressBytesToStringRequest) ProtoReflect() protoreflect.Message { } func (x *AddressBytesToStringRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4741,7 +5595,7 @@ func (x *AddressBytesToStringResponse) ProtoReflect() protoreflect.Message { } func (x *AddressBytesToStringResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5161,7 +6015,7 @@ func (x *AddressStringToBytesRequest) ProtoReflect() protoreflect.Message { } func (x *AddressStringToBytesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5581,7 +6435,7 @@ func (x *AddressStringToBytesResponse) ProtoReflect() protoreflect.Message { } func (x *AddressStringToBytesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6003,7 +6857,7 @@ func (x *QueryAccountAddressByIDRequest) ProtoReflect() protoreflect.Message { } func (x *QueryAccountAddressByIDRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6407,7 +7261,7 @@ func (x *QueryAccountAddressByIDResponse) ProtoReflect() protoreflect.Message { } func (x *QueryAccountAddressByIDResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6827,7 +7681,7 @@ func (x *QueryAccountInfoRequest) ProtoReflect() protoreflect.Message { } func (x *QueryAccountInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7247,7 +8101,7 @@ func (x *QueryAccountInfoResponse) ProtoReflect() protoreflect.Message { } func (x *QueryAccountInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7799,17 +8653,18 @@ func (x *QueryAccountRequest) GetAddress() string { return "" } -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsRequest struct { +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // account defines the account of the corresponding address. + Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } -func (x *QueryModuleAccountsRequest) Reset() { - *x = QueryModuleAccountsRequest{} +func (x *QueryAccountResponse) Reset() { + *x = QueryAccountResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7817,29 +8672,33 @@ func (x *QueryModuleAccountsRequest) Reset() { } } -func (x *QueryModuleAccountsRequest) String() string { +func (x *QueryAccountResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryModuleAccountsRequest) ProtoMessage() {} +func (*QueryAccountResponse) ProtoMessage() {} -// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{3} } -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { +func (x *QueryAccountResponse) GetAccount() *anypb.Any { + if x != nil { + return x.Account + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7847,36 +8706,29 @@ func (x *QueryParamsResponse) Reset() { } } -func (x *QueryParamsResponse) String() string { +func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{4} } -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // account defines the account of the corresponding address. - Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } -func (x *QueryAccountResponse) Reset() { - *x = QueryAccountResponse{} +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7884,33 +8736,35 @@ func (x *QueryAccountResponse) Reset() { } } -func (x *QueryAccountResponse) String() string { +func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryParamsResponse) ProtoMessage() {} -// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryAccountResponse) GetAccount() *anypb.Any { +func (x *QueryParamsResponse) GetParams() *Params { if x != nil { - return x.Account + return x.Params } return nil } -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} +func (x *QueryModuleAccountsRequest) Reset() { + *x = QueryModuleAccountsRequest{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7918,14 +8772,14 @@ func (x *QueryParamsRequest) Reset() { } } -func (x *QueryParamsRequest) String() string { +func (x *QueryModuleAccountsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryModuleAccountsRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{6} } @@ -7967,6 +8821,78 @@ func (x *QueryModuleAccountsResponse) GetAccounts() []*anypb.Any { return nil } +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *QueryModuleAccountByNameRequest) Reset() { + *x = QueryModuleAccountByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountByNameRequest) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountByNameRequest.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryModuleAccountByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *QueryModuleAccountByNameResponse) Reset() { + *x = QueryModuleAccountByNameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountByNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountByNameResponse) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountByNameResponse.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryModuleAccountByNameResponse) GetAccount() *anypb.Any { + if x != nil { + return x.Account + } + return nil +} + // Bech32PrefixRequest is the request type for Bech32Prefix rpc method. // // Since: cosmos-sdk 0.46 @@ -7979,7 +8905,7 @@ type Bech32PrefixRequest struct { func (x *Bech32PrefixRequest) Reset() { *x = Bech32PrefixRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7993,7 +8919,7 @@ func (*Bech32PrefixRequest) ProtoMessage() {} // Deprecated: Use Bech32PrefixRequest.ProtoReflect.Descriptor instead. func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} } // Bech32PrefixResponse is the response type for Bech32Prefix rpc method. @@ -8010,7 +8936,7 @@ type Bech32PrefixResponse struct { func (x *Bech32PrefixResponse) Reset() { *x = Bech32PrefixResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8024,7 +8950,7 @@ func (*Bech32PrefixResponse) ProtoMessage() {} // Deprecated: Use Bech32PrefixResponse.ProtoReflect.Descriptor instead. func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} } func (x *Bech32PrefixResponse) GetBech32Prefix() string { @@ -8048,7 +8974,7 @@ type AddressBytesToStringRequest struct { func (x *AddressBytesToStringRequest) Reset() { *x = AddressBytesToStringRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8062,7 +8988,7 @@ func (*AddressBytesToStringRequest) ProtoMessage() {} // Deprecated: Use AddressBytesToStringRequest.ProtoReflect.Descriptor instead. func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} } func (x *AddressBytesToStringRequest) GetAddressBytes() []byte { @@ -8086,7 +9012,7 @@ type AddressBytesToStringResponse struct { func (x *AddressBytesToStringResponse) Reset() { *x = AddressBytesToStringResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8100,7 +9026,7 @@ func (*AddressBytesToStringResponse) ProtoMessage() {} // Deprecated: Use AddressBytesToStringResponse.ProtoReflect.Descriptor instead. func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} } func (x *AddressBytesToStringResponse) GetAddressString() string { @@ -8124,7 +9050,7 @@ type AddressStringToBytesRequest struct { func (x *AddressStringToBytesRequest) Reset() { *x = AddressStringToBytesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8138,7 +9064,7 @@ func (*AddressStringToBytesRequest) ProtoMessage() {} // Deprecated: Use AddressStringToBytesRequest.ProtoReflect.Descriptor instead. func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} } func (x *AddressStringToBytesRequest) GetAddressString() string { @@ -8162,7 +9088,7 @@ type AddressStringToBytesResponse struct { func (x *AddressStringToBytesResponse) Reset() { *x = AddressStringToBytesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8176,7 +9102,7 @@ func (*AddressStringToBytesResponse) ProtoMessage() {} // Deprecated: Use AddressStringToBytesResponse.ProtoReflect.Descriptor instead. func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} } func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { @@ -8203,7 +9129,7 @@ type QueryAccountAddressByIDRequest struct { func (x *QueryAccountAddressByIDRequest) Reset() { *x = QueryAccountAddressByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8217,7 +9143,7 @@ func (*QueryAccountAddressByIDRequest) ProtoMessage() {} // Deprecated: Use QueryAccountAddressByIDRequest.ProtoReflect.Descriptor instead. func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} } func (x *QueryAccountAddressByIDRequest) GetId() int64 { @@ -8241,7 +9167,7 @@ type QueryAccountAddressByIDResponse struct { func (x *QueryAccountAddressByIDResponse) Reset() { *x = QueryAccountAddressByIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8255,7 +9181,7 @@ func (*QueryAccountAddressByIDResponse) ProtoMessage() {} // Deprecated: Use QueryAccountAddressByIDResponse.ProtoReflect.Descriptor instead. func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} } func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { @@ -8280,7 +9206,7 @@ type QueryAccountInfoRequest struct { func (x *QueryAccountInfoRequest) Reset() { *x = QueryAccountInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8294,7 +9220,7 @@ func (*QueryAccountInfoRequest) ProtoMessage() {} // Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} } func (x *QueryAccountInfoRequest) GetAddress() string { @@ -8319,7 +9245,7 @@ type QueryAccountInfoResponse struct { func (x *QueryAccountInfoResponse) Reset() { *x = QueryAccountInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8333,7 +9259,7 @@ func (*QueryAccountInfoResponse) ProtoMessage() {} // Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{19} } func (x *QueryAccountInfoResponse) GetInfo() *BaseAccount { @@ -8384,174 +9310,196 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x22, 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x00, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x0c, 0xca, 0xb4, 0x2d, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x63, 0x0a, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x63, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x42, 0x65, 0x63, - 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x42, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x1c, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, - 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xbf, 0x0b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x8d, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, + 0x74, 0x73, 0x22, 0x35, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x20, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x42, 0x65, 0x63, 0x68, + 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x42, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x1c, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, + 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x94, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, + 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xfe, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, + 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, - 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, + 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x94, + 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, + 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x8d, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, - 0xb5, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0xbc, + 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8d, 0x01, + 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, + 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, + 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb5, 0x01, + 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, + 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, - 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, - 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, + 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa4, + 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, - 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, + 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8566,63 +9514,68 @@ func file_cosmos_auth_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_auth_v1beta1_query_proto_rawDescData } -var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest - (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse - (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest - (*QueryModuleAccountsRequest)(nil), // 3: cosmos.auth.v1beta1.QueryModuleAccountsRequest - (*QueryParamsResponse)(nil), // 4: cosmos.auth.v1beta1.QueryParamsResponse - (*QueryAccountResponse)(nil), // 5: cosmos.auth.v1beta1.QueryAccountResponse - (*QueryParamsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryParamsRequest - (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse - (*Bech32PrefixRequest)(nil), // 8: cosmos.auth.v1beta1.Bech32PrefixRequest - (*Bech32PrefixResponse)(nil), // 9: cosmos.auth.v1beta1.Bech32PrefixResponse - (*AddressBytesToStringRequest)(nil), // 10: cosmos.auth.v1beta1.AddressBytesToStringRequest - (*AddressBytesToStringResponse)(nil), // 11: cosmos.auth.v1beta1.AddressBytesToStringResponse - (*AddressStringToBytesRequest)(nil), // 12: cosmos.auth.v1beta1.AddressStringToBytesRequest - (*AddressStringToBytesResponse)(nil), // 13: cosmos.auth.v1beta1.AddressStringToBytesResponse - (*QueryAccountAddressByIDRequest)(nil), // 14: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - (*QueryAccountAddressByIDResponse)(nil), // 15: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - (*QueryAccountInfoRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountInfoRequest - (*QueryAccountInfoResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountInfoResponse - (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 19: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 20: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 21: cosmos.auth.v1beta1.Params - (*BaseAccount)(nil), // 22: cosmos.auth.v1beta1.BaseAccount + (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest + (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse + (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest + (*QueryAccountResponse)(nil), // 3: cosmos.auth.v1beta1.QueryAccountResponse + (*QueryParamsRequest)(nil), // 4: cosmos.auth.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 5: cosmos.auth.v1beta1.QueryParamsResponse + (*QueryModuleAccountsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryModuleAccountsRequest + (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse + (*QueryModuleAccountByNameRequest)(nil), // 8: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest + (*QueryModuleAccountByNameResponse)(nil), // 9: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse + (*Bech32PrefixRequest)(nil), // 10: cosmos.auth.v1beta1.Bech32PrefixRequest + (*Bech32PrefixResponse)(nil), // 11: cosmos.auth.v1beta1.Bech32PrefixResponse + (*AddressBytesToStringRequest)(nil), // 12: cosmos.auth.v1beta1.AddressBytesToStringRequest + (*AddressBytesToStringResponse)(nil), // 13: cosmos.auth.v1beta1.AddressBytesToStringResponse + (*AddressStringToBytesRequest)(nil), // 14: cosmos.auth.v1beta1.AddressStringToBytesRequest + (*AddressStringToBytesResponse)(nil), // 15: cosmos.auth.v1beta1.AddressStringToBytesResponse + (*QueryAccountAddressByIDRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + (*QueryAccountAddressByIDResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + (*QueryAccountInfoRequest)(nil), // 18: cosmos.auth.v1beta1.QueryAccountInfoRequest + (*QueryAccountInfoResponse)(nil), // 19: cosmos.auth.v1beta1.QueryAccountInfoResponse + (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest + (*anypb.Any)(nil), // 21: google.protobuf.Any + (*v1beta1.PageResponse)(nil), // 22: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 23: cosmos.auth.v1beta1.Params + (*BaseAccount)(nil), // 24: cosmos.auth.v1beta1.BaseAccount } var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 18, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 20, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 19, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 19, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 22, // 6: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount - 0, // 7: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 8: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 14, // 9: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - 6, // 10: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 3, // 11: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 12: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 10, // 13: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 12, // 14: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 16, // 15: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest - 1, // 16: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 5, // 17: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 15, // 18: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - 4, // 19: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 20: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 21: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 11, // 22: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 13, // 23: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 17, // 24: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse - 16, // [16:25] is the sub-list for method output_type - 7, // [7:16] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 20, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 21, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any + 22, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 3: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any + 23, // 4: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params + 21, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 21, // 6: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account:type_name -> google.protobuf.Any + 24, // 7: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount + 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest + 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest + 16, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + 4, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest + 6, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest + 8, // 13: cosmos.auth.v1beta1.Query.ModuleAccountByName:input_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameRequest + 10, // 14: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest + 12, // 15: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest + 14, // 16: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest + 18, // 17: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest + 1, // 18: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse + 3, // 19: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse + 17, // 20: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + 5, // 21: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse + 7, // 22: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse + 9, // 23: cosmos.auth.v1beta1.Query.ModuleAccountByName:output_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameResponse + 11, // 24: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse + 13, // 25: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse + 15, // 26: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse + 19, // 27: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse + 18, // [18:28] is the sub-list for method output_type + 8, // [8:18] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_auth_v1beta1_query_proto_init() } @@ -8669,7 +9622,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountsRequest); i { + switch v := v.(*QueryAccountResponse); i { case 0: return &v.state case 1: @@ -8681,7 +9634,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { + switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: @@ -8693,7 +9646,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountResponse); i { + switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: @@ -8705,7 +9658,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryModuleAccountsRequest); i { case 0: return &v.state case 1: @@ -8729,7 +9682,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixRequest); i { + switch v := v.(*QueryModuleAccountByNameRequest); i { case 0: return &v.state case 1: @@ -8741,7 +9694,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixResponse); i { + switch v := v.(*QueryModuleAccountByNameResponse); i { case 0: return &v.state case 1: @@ -8753,7 +9706,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringRequest); i { + switch v := v.(*Bech32PrefixRequest); i { case 0: return &v.state case 1: @@ -8765,7 +9718,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringResponse); i { + switch v := v.(*Bech32PrefixResponse); i { case 0: return &v.state case 1: @@ -8777,7 +9730,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesRequest); i { + switch v := v.(*AddressBytesToStringRequest); i { case 0: return &v.state case 1: @@ -8789,7 +9742,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesResponse); i { + switch v := v.(*AddressBytesToStringResponse); i { case 0: return &v.state case 1: @@ -8801,7 +9754,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountAddressByIDRequest); i { + switch v := v.(*AddressStringToBytesRequest); i { case 0: return &v.state case 1: @@ -8813,7 +9766,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountAddressByIDResponse); i { + switch v := v.(*AddressStringToBytesResponse); i { case 0: return &v.state case 1: @@ -8825,7 +9778,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoRequest); i { + switch v := v.(*QueryAccountAddressByIDRequest); i { case 0: return &v.state case 1: @@ -8837,6 +9790,30 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountAddressByIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccountInfoResponse); i { case 0: return &v.state @@ -8855,7 +9832,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_auth_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/auth/v1beta1/query_grpc.pb.go b/api/cosmos/auth/v1beta1/query_grpc.pb.go index 4b62fbdecce8..1755c334de47 100644 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ b/api/cosmos/auth/v1beta1/query_grpc.pb.go @@ -41,6 +41,8 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -112,6 +114,15 @@ func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccount return out, nil } +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { out := new(Bech32PrefixResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) @@ -171,6 +182,8 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -209,6 +222,9 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q func (UnimplementedQueryServer) ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") } +func (UnimplementedQueryServer) ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} func (UnimplementedQueryServer) Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") } @@ -324,6 +340,24 @@ func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bech32PrefixRequest) if err := dec(in); err != nil { @@ -423,6 +457,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "ModuleAccounts", Handler: _Query_ModuleAccounts_Handler, }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, { MethodName: "Bech32Prefix", Handler: _Query_Bech32Prefix_Handler, diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index ec8deed7d6db..2665563e798a 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -52,6 +52,12 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; } + // ModuleAccountByName returns the module account info by module name + rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; + } + // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -114,17 +120,6 @@ message QueryAccountRequest { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryModuleAccountsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - // QueryAccountResponse is the response type for the Query/Account RPC method. message QueryAccountResponse { // account defines the account of the corresponding address. @@ -134,6 +129,17 @@ message QueryAccountResponse { // QueryParamsRequest is the request type for the Query/Params RPC method. message QueryParamsRequest {} +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +message QueryModuleAccountsRequest {} + // QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. // // Since: cosmos-sdk 0.46 @@ -141,6 +147,16 @@ message QueryModuleAccountsResponse { repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; } +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameRequest { + string name = 1; +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameResponse { + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; +} + // Bech32PrefixRequest is the request type for Bech32Prefix rpc method. // // Since: cosmos-sdk 0.46 diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index 329489c73d64..3e993901e29c 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -18,6 +18,7 @@ import ( "cosmossdk.io/math" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/client" @@ -1422,6 +1423,68 @@ func (s *IntegrationTestSuite) TestGetAccountsCmd() { s.Require().NotEmpty(res.Accounts) } +func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + moduleName string + expectErr bool + }{ + { + "invalid module name", + "gover", + true, + }, + { + "valid module name", + "mint", + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountByNameCmd(), []string{ + tc.moduleName, + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var res authtypes.QueryModuleAccountByNameResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + var account types.AccountI + err := val.ClientCtx.InterfaceRegistry.UnpackAny(res.Account, &account) + s.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + s.Require().True(ok) + s.Require().Equal(tc.moduleName, moduleAccount.GetName()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryModuleAccountsCmd() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountsCmd(), []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + s.Require().NoError(err) + + var res authtypes.QueryModuleAccountsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().NotEmpty(res.Accounts) +} + func TestGetBroadcastCommandOfflineFlag(t *testing.T) { cmd := authcli.GetBroadcastCommand() _ = testutil.ApplyMockIODiscardOutErr(cmd) diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index c86f66a04143..7af525b6be58 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -46,6 +46,7 @@ func GetQueryCmd() *cobra.Command { GetAccountsCmd(), QueryParamsCmd(), QueryModuleAccountsCmd(), + QueryModuleAccountByNameCmd(), ) return cmd @@ -219,6 +220,40 @@ func QueryModuleAccountsCmd() *cobra.Command { return cmd } +// QueryModuleAccountByNameCmd returns a command to +func QueryModuleAccountByNameCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "module-account [module-name]", + Short: "Query module account info by module name", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf("%s q auth module-account auth", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + moduleName := args[0] + if len(moduleName) == 0 { + return fmt.Errorf("module name should not be empty") + } + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.ModuleAccountByName(context.Background(), &types.QueryModuleAccountByNameRequest{Name: moduleName}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // QueryTxsByEventsCmd returns a command to search through transactions by events. func QueryTxsByEventsCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 12b0e77e1800..2d5ac8cde223 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -135,6 +135,31 @@ func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModule return &types.QueryModuleAccountsResponse{Accounts: modAccounts}, nil } +// ModuleAccountByName returns module account by module name +func (ak AccountKeeper) ModuleAccountByName(c context.Context, req *types.QueryModuleAccountByNameRequest) (*types.QueryModuleAccountByNameResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if len(req.Name) == 0 { + return nil, status.Error(codes.InvalidArgument, "module name is empty") + } + + ctx := sdk.UnwrapSDKContext(c) + moduleName := req.Name + + account := ak.GetModuleAccount(ctx, moduleName) + if account == nil { + return nil, status.Errorf(codes.NotFound, "account %s not found", moduleName) + } + any, err := codectypes.NewAnyWithValue(account) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + return &types.QueryModuleAccountByNameResponse{Account: any}, nil +} + // Bech32Prefix returns the keeper internally stored bech32 prefix. func (ak AccountKeeper) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { bech32Prefix, err := ak.getBech32Prefix() diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 86bec2e27ef6..a1bc322a778a 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -350,6 +350,61 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { } } +func (suite *KeeperTestSuite) TestGRPCQueryModuleAccountByName() { + var req *types.QueryModuleAccountByNameRequest + + testCases := []struct { + msg string + malleate func() + expPass bool + posttests func(res *types.QueryModuleAccountByNameResponse) + }{ + { + "success", + func() { + req = &types.QueryModuleAccountByNameRequest{Name: "mint"} + }, + true, + func(res *types.QueryModuleAccountByNameResponse) { + var account types.AccountI + err := suite.encCfg.InterfaceRegistry.UnpackAny(res.Account, &account) + suite.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + suite.Require().True(ok) + suite.Require().Equal(moduleAccount.GetName(), "mint") + }, + }, + { + "invalid module name", + func() { + req = &types.QueryModuleAccountByNameRequest{Name: "gover"} + }, + false, + func(res *types.QueryModuleAccountByNameResponse) { + }, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + res, err := suite.queryClient.ModuleAccountByName(ctx, req) + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + + tc.posttests(res) + }) + } +} + func (suite *KeeperTestSuite) TestBech32Prefix() { suite.SetupTest() // reset req := &types.Bech32PrefixRequest{} diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index c597bcf70dfa..cd2005ecb770 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -176,24 +176,24 @@ func (m *QueryAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsRequest struct { +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { + // account defines the account of the corresponding address. + Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } -func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } -func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountsRequest) ProtoMessage() {} -func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { +func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } +func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c451370b3929a27c, []int{3} } -func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryModuleAccountsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -203,17 +203,61 @@ func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) +func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountResponse.Merge(m, src) } -func (m *QueryModuleAccountsRequest) XXX_Size() int { +func (m *QueryAccountResponse) XXX_Size() int { return m.Size() } -func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) +func (m *QueryAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo + +func (m *QueryAccountResponse) GetAccount() *types.Any { + if m != nil { + return m.Account + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{4} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { @@ -225,7 +269,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{4} + return fileDescriptor_c451370b3929a27c, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,24 +305,24 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { - // account defines the account of the corresponding address. - Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsRequest struct { } -func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } -func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountResponse) ProtoMessage() {} -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{5} +func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } +func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsRequest) ProtoMessage() {} +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{6} } -func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryModuleAccountsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -288,41 +332,82 @@ func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountResponse.Merge(m, src) +func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) } -func (m *QueryAccountResponse) XXX_Size() int { +func (m *QueryModuleAccountsRequest) XXX_Size() int { return m.Size() } -func (m *QueryAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) +func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo -func (m *QueryAccountResponse) GetAccount() *types.Any { +// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsResponse struct { + Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } +func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsResponse) ProtoMessage() {} +func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{7} +} +func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountsResponse.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 *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) +} +func (m *QueryModuleAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo + +func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { if m != nil { - return m.Account + return m.Accounts } return nil } -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{6} +func (m *QueryModuleAccountByNameRequest) Reset() { *m = QueryModuleAccountByNameRequest{} } +func (m *QueryModuleAccountByNameRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountByNameRequest) ProtoMessage() {} +func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{8} } -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryModuleAccountByNameRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryModuleAccountByNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryModuleAccountByNameRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -332,37 +417,42 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) +func (m *QueryModuleAccountByNameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountByNameRequest.Merge(m, src) } -func (m *QueryParamsRequest) XXX_Size() int { +func (m *QueryModuleAccountByNameRequest) XXX_Size() int { return m.Size() } -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +func (m *QueryModuleAccountByNameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountByNameRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryModuleAccountByNameRequest proto.InternalMessageInfo -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsResponse struct { - Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +func (m *QueryModuleAccountByNameRequest) GetName() string { + if m != nil { + return m.Name + } + return "" } -func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } -func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountsResponse) ProtoMessage() {} -func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{7} +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameResponse struct { + Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } -func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { + +func (m *QueryModuleAccountByNameResponse) Reset() { *m = QueryModuleAccountByNameResponse{} } +func (m *QueryModuleAccountByNameResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountByNameResponse) ProtoMessage() {} +func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{9} +} +func (m *QueryModuleAccountByNameResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryModuleAccountByNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryModuleAccountsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryModuleAccountByNameResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -372,21 +462,21 @@ func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) +func (m *QueryModuleAccountByNameResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountByNameResponse.Merge(m, src) } -func (m *QueryModuleAccountsResponse) XXX_Size() int { +func (m *QueryModuleAccountByNameResponse) XXX_Size() int { return m.Size() } -func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) +func (m *QueryModuleAccountByNameResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountByNameResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryModuleAccountByNameResponse proto.InternalMessageInfo -func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { +func (m *QueryModuleAccountByNameResponse) GetAccount() *types.Any { if m != nil { - return m.Accounts + return m.Account } return nil } @@ -401,7 +491,7 @@ func (m *Bech32PrefixRequest) Reset() { *m = Bech32PrefixRequest{} } func (m *Bech32PrefixRequest) String() string { return proto.CompactTextString(m) } func (*Bech32PrefixRequest) ProtoMessage() {} func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{8} + return fileDescriptor_c451370b3929a27c, []int{10} } func (m *Bech32PrefixRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +531,7 @@ func (m *Bech32PrefixResponse) Reset() { *m = Bech32PrefixResponse{} } func (m *Bech32PrefixResponse) String() string { return proto.CompactTextString(m) } func (*Bech32PrefixResponse) ProtoMessage() {} func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{9} + return fileDescriptor_c451370b3929a27c, []int{11} } func (m *Bech32PrefixResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -488,7 +578,7 @@ func (m *AddressBytesToStringRequest) Reset() { *m = AddressBytesToStrin func (m *AddressBytesToStringRequest) String() string { return proto.CompactTextString(m) } func (*AddressBytesToStringRequest) ProtoMessage() {} func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{10} + return fileDescriptor_c451370b3929a27c, []int{12} } func (m *AddressBytesToStringRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -535,7 +625,7 @@ func (m *AddressBytesToStringResponse) Reset() { *m = AddressBytesToStri func (m *AddressBytesToStringResponse) String() string { return proto.CompactTextString(m) } func (*AddressBytesToStringResponse) ProtoMessage() {} func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{11} + return fileDescriptor_c451370b3929a27c, []int{13} } func (m *AddressBytesToStringResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +672,7 @@ func (m *AddressStringToBytesRequest) Reset() { *m = AddressStringToByte func (m *AddressStringToBytesRequest) String() string { return proto.CompactTextString(m) } func (*AddressStringToBytesRequest) ProtoMessage() {} func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{12} + return fileDescriptor_c451370b3929a27c, []int{14} } func (m *AddressStringToBytesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -629,7 +719,7 @@ func (m *AddressStringToBytesResponse) Reset() { *m = AddressStringToByt func (m *AddressStringToBytesResponse) String() string { return proto.CompactTextString(m) } func (*AddressStringToBytesResponse) ProtoMessage() {} func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{13} + return fileDescriptor_c451370b3929a27c, []int{15} } func (m *AddressStringToBytesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -679,7 +769,7 @@ func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddr func (m *QueryAccountAddressByIDRequest) String() string { return proto.CompactTextString(m) } func (*QueryAccountAddressByIDRequest) ProtoMessage() {} func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{14} + return fileDescriptor_c451370b3929a27c, []int{16} } func (m *QueryAccountAddressByIDRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -726,7 +816,7 @@ func (m *QueryAccountAddressByIDResponse) Reset() { *m = QueryAccountAdd func (m *QueryAccountAddressByIDResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountAddressByIDResponse) ProtoMessage() {} func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{15} + return fileDescriptor_c451370b3929a27c, []int{17} } func (m *QueryAccountAddressByIDResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +864,7 @@ func (m *QueryAccountInfoRequest) Reset() { *m = QueryAccountInfoRequest func (m *QueryAccountInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryAccountInfoRequest) ProtoMessage() {} func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{16} + return fileDescriptor_c451370b3929a27c, []int{18} } func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -822,7 +912,7 @@ func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoRespon func (m *QueryAccountInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountInfoResponse) ProtoMessage() {} func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{17} + return fileDescriptor_c451370b3929a27c, []int{19} } func (m *QueryAccountInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,11 +952,13 @@ func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") proto.RegisterType((*QueryAccountRequest)(nil), "cosmos.auth.v1beta1.QueryAccountRequest") - proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") proto.RegisterType((*QueryAccountResponse)(nil), "cosmos.auth.v1beta1.QueryAccountResponse") proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.auth.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsRequest") proto.RegisterType((*QueryModuleAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsResponse") + proto.RegisterType((*QueryModuleAccountByNameRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") + proto.RegisterType((*QueryModuleAccountByNameResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") proto.RegisterType((*Bech32PrefixRequest)(nil), "cosmos.auth.v1beta1.Bech32PrefixRequest") proto.RegisterType((*Bech32PrefixResponse)(nil), "cosmos.auth.v1beta1.Bech32PrefixResponse") proto.RegisterType((*AddressBytesToStringRequest)(nil), "cosmos.auth.v1beta1.AddressBytesToStringRequest") @@ -882,68 +974,72 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x69, 0x49, 0xc2, 0x8b, 0x1b, 0xa4, 0x89, 0x2b, 0xc2, 0x3a, 0xb5, 0xa3, 0x2d, - 0x34, 0x4e, 0xa8, 0x77, 0x1b, 0x27, 0x07, 0x0a, 0x08, 0x29, 0x6e, 0x00, 0xe5, 0x50, 0xc9, 0x6c, - 0x73, 0xe2, 0x80, 0xb5, 0xf6, 0x6e, 0x36, 0x2b, 0x9a, 0x1d, 0xd7, 0xb3, 0x46, 0x8d, 0xaa, 0x5c, - 0x90, 0x90, 0x7a, 0xa9, 0x84, 0x04, 0x7f, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x95, 0x6b, 0xd5, - 0x53, 0x04, 0x17, 0x4e, 0x08, 0x25, 0x48, 0xf0, 0x67, 0x20, 0xcf, 0xbc, 0xd9, 0x1f, 0xc9, 0xd8, - 0xde, 0x88, 0x53, 0xbc, 0x33, 0xef, 0x7d, 0xdf, 0x67, 0xde, 0x7b, 0xf3, 0x26, 0x50, 0xed, 0x52, - 0x76, 0x40, 0x99, 0xe5, 0x0c, 0xa2, 0x7d, 0xeb, 0xab, 0xf5, 0x8e, 0x17, 0x39, 0xeb, 0xd6, 0x93, - 0x81, 0xd7, 0x3f, 0x34, 0x7b, 0x7d, 0x1a, 0x51, 0xb2, 0x20, 0x0c, 0xcc, 0xa1, 0x81, 0x89, 0x06, - 0xfa, 0x1a, 0x7a, 0x75, 0x1c, 0xe6, 0x09, 0xeb, 0xd8, 0xb7, 0xe7, 0xf8, 0x41, 0xe8, 0x44, 0x01, - 0x0d, 0x85, 0x80, 0x5e, 0xf2, 0xa9, 0x4f, 0xf9, 0x4f, 0x6b, 0xf8, 0x0b, 0x57, 0xdf, 0xf2, 0x29, - 0xf5, 0x1f, 0x7b, 0x16, 0xff, 0xea, 0x0c, 0xf6, 0x2c, 0x27, 0xc4, 0x88, 0xfa, 0x12, 0x6e, 0x39, - 0xbd, 0xc0, 0x72, 0xc2, 0x90, 0x46, 0x5c, 0x8d, 0xe1, 0x6e, 0x45, 0x05, 0xcc, 0xe1, 0x50, 0x58, - 0xec, 0xb7, 0x45, 0x44, 0x84, 0x17, 0x5b, 0x65, 0x74, 0x95, 0xc0, 0xe9, 0x73, 0x1a, 0x5f, 0x40, - 0xe9, 0xb3, 0xe1, 0xe7, 0x56, 0xb7, 0x4b, 0x07, 0x61, 0xc4, 0x6c, 0xef, 0xc9, 0xc0, 0x63, 0x11, - 0xf9, 0x04, 0x20, 0x39, 0xd2, 0xa2, 0xb6, 0xac, 0xd5, 0xe6, 0x1a, 0x77, 0x4c, 0xd4, 0x1d, 0x9e, - 0xdf, 0x14, 0x2a, 0x88, 0x62, 0xb6, 0x1c, 0xdf, 0x43, 0x5f, 0x3b, 0xe5, 0x69, 0x1c, 0x6b, 0x70, - 0xf3, 0x42, 0x00, 0xd6, 0xa3, 0x21, 0xf3, 0xc8, 0x47, 0x30, 0xeb, 0xe0, 0xda, 0xa2, 0xb6, 0x7c, - 0xad, 0x36, 0xd7, 0x28, 0x99, 0x22, 0x05, 0xa6, 0xcc, 0x8e, 0xb9, 0x15, 0x1e, 0x36, 0x8b, 0xaf, - 0x4e, 0xea, 0xb3, 0xe8, 0xbd, 0x63, 0xc7, 0x3e, 0xe4, 0xd3, 0x0c, 0xe1, 0x14, 0x27, 0x5c, 0x99, - 0x48, 0x28, 0x82, 0x67, 0x10, 0x1f, 0xc1, 0x42, 0x9a, 0x50, 0x66, 0xa0, 0x01, 0x33, 0x8e, 0xeb, - 0xf6, 0x3d, 0xc6, 0xf8, 0xf1, 0x5f, 0x6f, 0x2e, 0xfe, 0x76, 0x52, 0x2f, 0xa1, 0xfe, 0x96, 0xd8, - 0x79, 0x14, 0xf5, 0x83, 0xd0, 0xb7, 0xa5, 0xe1, 0xfb, 0xb3, 0xcf, 0x8f, 0xab, 0x85, 0x7f, 0x8f, - 0xab, 0x05, 0x63, 0x09, 0x74, 0x2e, 0xfa, 0x90, 0xba, 0x83, 0xc7, 0xde, 0x85, 0xec, 0x1a, 0x2d, - 0x0c, 0xd9, 0x72, 0xfa, 0xce, 0x41, 0x92, 0x92, 0xfb, 0x30, 0xdd, 0xe3, 0x2b, 0x98, 0xf0, 0xb2, - 0xa9, 0xe8, 0x42, 0x53, 0x38, 0x35, 0xaf, 0xbf, 0xfc, 0xb3, 0x5a, 0xb0, 0xd1, 0xc1, 0xd8, 0xcd, - 0xd6, 0x31, 0x96, 0xfc, 0x10, 0x66, 0x30, 0x63, 0xa8, 0x99, 0x27, 0xc9, 0xd2, 0xc5, 0x28, 0x01, - 0xc9, 0x70, 0x0a, 0xfa, 0x2e, 0x94, 0x95, 0x67, 0xc3, 0x90, 0xdb, 0x39, 0x0b, 0x4b, 0x5e, 0x9d, - 0xd4, 0xe7, 0x33, 0x1a, 0xa9, 0xf2, 0x1a, 0x37, 0x61, 0xa1, 0xe9, 0x75, 0xf7, 0x37, 0x1a, 0xad, - 0xbe, 0xb7, 0x17, 0x3c, 0x95, 0xb1, 0x3f, 0x80, 0x52, 0x76, 0x19, 0x83, 0xde, 0x86, 0x1b, 0x1d, - 0xbe, 0xde, 0xee, 0xf1, 0x0d, 0x51, 0x33, 0xbb, 0xd8, 0x49, 0x19, 0x1b, 0x4d, 0x28, 0x63, 0xe1, - 0x9a, 0x87, 0x91, 0xc7, 0x76, 0x29, 0xd6, 0x0f, 0x2b, 0x7e, 0x1b, 0x6e, 0x60, 0x21, 0xdb, 0x9d, - 0xe1, 0x3e, 0xd7, 0x28, 0xda, 0x45, 0x27, 0xe5, 0x63, 0x7c, 0x0c, 0x4b, 0x6a, 0x0d, 0x04, 0x79, - 0x07, 0xe6, 0xa5, 0x08, 0xe3, 0x3b, 0x48, 0x22, 0xa5, 0x85, 0xb9, 0xb1, 0x1d, 0xa3, 0x88, 0x85, - 0x5d, 0xca, 0xe5, 0x24, 0x4a, 0x4e, 0x95, 0x07, 0x31, 0xcc, 0x05, 0x95, 0x24, 0x2b, 0x93, 0x4f, - 0x74, 0x0f, 0x2a, 0xe9, 0xd6, 0x89, 0x4f, 0xb7, 0xb3, 0x2d, 0x69, 0xe6, 0x61, 0x2a, 0x70, 0xb9, - 0xef, 0x35, 0x7b, 0x2a, 0x70, 0x0d, 0x17, 0xaa, 0x23, 0x3d, 0x30, 0xf2, 0x16, 0xbc, 0x81, 0xa5, - 0x6c, 0xe7, 0xbd, 0x45, 0xf3, 0x4e, 0x46, 0xce, 0x78, 0x08, 0x6f, 0xa6, 0xa3, 0xec, 0x84, 0x7b, - 0xf4, 0x7f, 0xdc, 0x4d, 0xa3, 0x05, 0x8b, 0x97, 0xe5, 0x90, 0x76, 0x13, 0xae, 0x07, 0xe1, 0x1e, - 0xc5, 0x2b, 0xb2, 0xac, 0xbc, 0x76, 0x4d, 0x87, 0xc9, 0x3e, 0xb5, 0xb9, 0x75, 0xe3, 0xd7, 0x39, - 0x78, 0x8d, 0x4b, 0x92, 0x17, 0x1a, 0xc8, 0xdb, 0xc3, 0xc8, 0xaa, 0xd2, 0x5d, 0x35, 0x65, 0xf5, - 0xb5, 0x3c, 0xa6, 0x82, 0xd1, 0x58, 0x7b, 0xfe, 0xcf, 0x4f, 0x6b, 0xda, 0xd7, 0xbf, 0xff, 0xfd, - 0xdd, 0x54, 0x95, 0xdc, 0xb2, 0x94, 0xef, 0x81, 0x44, 0xf8, 0x5e, 0x83, 0x19, 0x14, 0x20, 0xb5, - 0x89, 0x31, 0x24, 0xcd, 0x6a, 0x0e, 0x4b, 0x84, 0xd9, 0x4c, 0x60, 0x56, 0xc9, 0xca, 0x58, 0x18, - 0xeb, 0x19, 0x56, 0xe0, 0x88, 0xfc, 0xac, 0x01, 0xb9, 0xdc, 0x33, 0x64, 0x63, 0x62, 0xdc, 0xcb, - 0x3d, 0xa9, 0x6f, 0x5e, 0xcd, 0xe9, 0x0a, 0xdc, 0xf1, 0x85, 0x69, 0x07, 0xae, 0xf5, 0x2c, 0x70, - 0x8f, 0xc8, 0x37, 0x1a, 0x4c, 0x8b, 0x11, 0x48, 0x56, 0x46, 0x87, 0xcd, 0x0c, 0x49, 0xbd, 0x36, - 0xd9, 0x10, 0x99, 0x6a, 0x09, 0xd3, 0x2d, 0x52, 0x56, 0x32, 0x89, 0x21, 0x4f, 0x7e, 0xd4, 0x20, - 0x3b, 0x30, 0x19, 0xb1, 0x46, 0x87, 0x51, 0x3e, 0x3d, 0xfa, 0xbd, 0xfc, 0x0e, 0xc8, 0xb7, 0x9e, - 0xf0, 0xdd, 0x21, 0x6f, 0x2b, 0xf9, 0x0e, 0xb8, 0x67, 0x3b, 0xee, 0xbf, 0x17, 0x1a, 0x14, 0xd3, - 0x63, 0x7a, 0x44, 0x13, 0x2a, 0x06, 0xfc, 0x88, 0x26, 0x54, 0xcd, 0xfc, 0x3c, 0x89, 0x13, 0xe3, - 0x7f, 0xd8, 0x78, 0x25, 0xd5, 0xd4, 0x26, 0xea, 0x6c, 0x8c, 0x79, 0x24, 0xf4, 0xf5, 0x2b, 0x78, - 0x20, 0xe7, 0x7b, 0x09, 0x67, 0x9d, 0xbc, 0x3b, 0x86, 0x33, 0xbe, 0x2a, 0x62, 0x5a, 0x1f, 0x91, - 0x5f, 0x12, 0xee, 0xcc, 0x80, 0x1f, 0xcf, 0xad, 0x7a, 0x51, 0xc6, 0x73, 0x2b, 0x5f, 0x0f, 0xe3, - 0x7e, 0xc2, 0x6d, 0x92, 0xbb, 0xb9, 0xb8, 0xc5, 0x63, 0x75, 0x44, 0x7e, 0xd0, 0x60, 0x2e, 0x35, - 0x68, 0xc9, 0xdd, 0x89, 0xb7, 0x35, 0x35, 0xde, 0xf5, 0x7a, 0x4e, 0xeb, 0xfc, 0xf9, 0x95, 0x6f, - 0xd1, 0x70, 0x6e, 0x27, 0x03, 0xa9, 0xf9, 0xe0, 0xe5, 0x59, 0x45, 0x3b, 0x3d, 0xab, 0x68, 0x7f, - 0x9d, 0x55, 0xb4, 0x6f, 0xcf, 0x2b, 0x85, 0xd3, 0xf3, 0x4a, 0xe1, 0x8f, 0xf3, 0x4a, 0xe1, 0xf3, - 0x55, 0x3f, 0x88, 0xf6, 0x07, 0x1d, 0xb3, 0x4b, 0x0f, 0xa4, 0xa0, 0xf8, 0x53, 0x67, 0xee, 0x97, - 0xd6, 0x53, 0xa1, 0x1e, 0x1d, 0xf6, 0x3c, 0xd6, 0x99, 0xe6, 0xff, 0xd5, 0x6c, 0xfc, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x83, 0xfa, 0x46, 0x09, 0x54, 0x0c, 0x00, 0x00, + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xc7, 0xbd, 0x69, 0x7e, 0x49, 0x7e, 0x4f, 0xdc, 0x20, 0x4d, 0x5c, 0x11, 0xd6, 0xa9, 0x1d, + 0x6d, 0xa1, 0x71, 0x42, 0xbd, 0xdb, 0x38, 0xa9, 0x44, 0x01, 0x21, 0x65, 0x1b, 0x40, 0x39, 0x14, + 0x19, 0x37, 0x27, 0x0e, 0x58, 0x63, 0x7b, 0xed, 0xac, 0xa8, 0x77, 0x5c, 0xef, 0x1a, 0xd5, 0x8a, + 0x7c, 0x41, 0x42, 0xea, 0x05, 0x09, 0x09, 0x5e, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x89, 0x17, + 0x50, 0xf5, 0x54, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xbc, 0x0a, 0x84, 0x3c, 0xf3, 0xcc, 0xfe, + 0x49, 0xc6, 0xf1, 0x46, 0x9c, 0xb2, 0x9e, 0x79, 0x9e, 0xef, 0xf3, 0x99, 0x99, 0x67, 0xe6, 0x1b, + 0x28, 0x36, 0x99, 0xdf, 0x65, 0xbe, 0x45, 0x07, 0xc1, 0xa1, 0xf5, 0xf9, 0x56, 0xc3, 0x09, 0xe8, + 0x96, 0xf5, 0x64, 0xe0, 0xf4, 0x87, 0x66, 0xaf, 0xcf, 0x02, 0x46, 0x96, 0x45, 0x80, 0x39, 0x0e, + 0x30, 0x31, 0x40, 0xdf, 0xc4, 0xac, 0x06, 0xf5, 0x1d, 0x11, 0x1d, 0xe6, 0xf6, 0x68, 0xc7, 0xf5, + 0x68, 0xe0, 0x32, 0x4f, 0x08, 0xe8, 0xb9, 0x0e, 0xeb, 0x30, 0xfe, 0x69, 0x8d, 0xbf, 0x70, 0xf4, + 0xb5, 0x0e, 0x63, 0x9d, 0xc7, 0x8e, 0xc5, 0x7f, 0x35, 0x06, 0x6d, 0x8b, 0x7a, 0x58, 0x51, 0x5f, + 0xc5, 0x29, 0xda, 0x73, 0x2d, 0xea, 0x79, 0x2c, 0xe0, 0x6a, 0x3e, 0xce, 0x16, 0x54, 0xc0, 0x1c, + 0x0e, 0x85, 0xc5, 0x7c, 0x5d, 0x54, 0x44, 0x78, 0x31, 0x95, 0xc7, 0x54, 0x09, 0x1c, 0x5f, 0xa7, + 0xf1, 0x29, 0xe4, 0x3e, 0x1e, 0xff, 0xdc, 0x6d, 0x36, 0xd9, 0xc0, 0x0b, 0xfc, 0x9a, 0xf3, 0x64, + 0xe0, 0xf8, 0x01, 0xf9, 0x00, 0x20, 0x5a, 0xd2, 0x8a, 0xb6, 0xa6, 0x95, 0x16, 0x2b, 0xb7, 0x4d, + 0xd4, 0x1d, 0xaf, 0xdf, 0x14, 0x2a, 0x88, 0x62, 0x56, 0x69, 0xc7, 0xc1, 0xdc, 0x5a, 0x2c, 0xd3, + 0x38, 0xd6, 0xe0, 0xc6, 0xb9, 0x02, 0x7e, 0x8f, 0x79, 0xbe, 0x43, 0xde, 0x83, 0x05, 0x8a, 0x63, + 0x2b, 0xda, 0xda, 0xb5, 0xd2, 0x62, 0x25, 0x67, 0x8a, 0x2d, 0x30, 0xe5, 0xee, 0x98, 0xbb, 0xde, + 0xd0, 0xce, 0xbe, 0x38, 0x29, 0x2f, 0x60, 0xf6, 0x7e, 0x2d, 0xcc, 0x21, 0x1f, 0x26, 0x08, 0x67, + 0x38, 0xe1, 0xfa, 0x54, 0x42, 0x51, 0x3c, 0x81, 0xf8, 0x08, 0x96, 0xe3, 0x84, 0x72, 0x07, 0x2a, + 0x30, 0x4f, 0x5b, 0xad, 0xbe, 0xe3, 0xfb, 0x7c, 0xf9, 0xff, 0xb7, 0x57, 0x7e, 0x39, 0x29, 0xe7, + 0x50, 0x7f, 0x57, 0xcc, 0x3c, 0x0a, 0xfa, 0xae, 0xd7, 0xa9, 0xc9, 0xc0, 0xb7, 0x17, 0x9e, 0x1d, + 0x17, 0x33, 0x7f, 0x1f, 0x17, 0x33, 0xc6, 0x41, 0x72, 0x5f, 0xc3, 0x55, 0xbf, 0x0b, 0xf3, 0xb8, + 0x02, 0xdc, 0xd4, 0x34, 0x8b, 0x96, 0x29, 0x46, 0x0e, 0x08, 0x57, 0xad, 0xd2, 0x3e, 0xed, 0xca, + 0xb3, 0x32, 0xaa, 0xb8, 0x00, 0x39, 0x8a, 0xa5, 0xee, 0xc3, 0x5c, 0x8f, 0x8f, 0x60, 0xa5, 0xbc, + 0xa9, 0xe8, 0x69, 0x53, 0x24, 0xd9, 0xb3, 0xcf, 0x7f, 0x2f, 0x66, 0x6a, 0x98, 0x60, 0xac, 0x82, + 0xce, 0x15, 0x1f, 0xb2, 0xd6, 0xe0, 0xb1, 0x73, 0xae, 0x37, 0x8c, 0x26, 0xe4, 0x95, 0xb3, 0x58, + 0x77, 0x2f, 0xe5, 0xc1, 0x92, 0x17, 0x27, 0xe5, 0xa5, 0x84, 0x46, 0xec, 0x78, 0x8d, 0x7b, 0x50, + 0xbc, 0x58, 0xc4, 0x1e, 0x7e, 0x44, 0xbb, 0xb2, 0xcf, 0x08, 0x81, 0x59, 0x8f, 0x76, 0x1d, 0x71, + 0x3c, 0x35, 0xfe, 0x6d, 0xb4, 0x61, 0x6d, 0x72, 0x1a, 0x02, 0xda, 0xe9, 0xce, 0x40, 0xc5, 0x17, + 0x9e, 0xc4, 0x0d, 0x58, 0xb6, 0x9d, 0xe6, 0xe1, 0x76, 0xa5, 0xda, 0x77, 0xda, 0xee, 0x53, 0xb9, + 0x35, 0xef, 0x40, 0x2e, 0x39, 0x8c, 0x25, 0x6f, 0xc1, 0xf5, 0x06, 0x1f, 0xaf, 0xf7, 0xf8, 0x04, + 0x32, 0x67, 0x1b, 0xb1, 0x60, 0xc3, 0x86, 0x3c, 0xf6, 0x95, 0x3d, 0x0c, 0x1c, 0xff, 0x80, 0x61, + 0x7b, 0xe1, 0x72, 0x6f, 0xc1, 0x75, 0xec, 0xb3, 0x7a, 0x63, 0x3c, 0xcf, 0x35, 0xb2, 0xb5, 0x2c, + 0x8d, 0xe5, 0x18, 0xef, 0xc3, 0xaa, 0x5a, 0x03, 0x41, 0xde, 0x80, 0x25, 0x29, 0xe2, 0xf3, 0x19, + 0x24, 0x91, 0xd2, 0x22, 0xdc, 0xd8, 0x0b, 0x51, 0xc4, 0xc0, 0x01, 0xe3, 0x72, 0x12, 0x25, 0xa5, + 0xca, 0x83, 0x10, 0xe6, 0x9c, 0x4a, 0xb4, 0x2b, 0xd3, 0x57, 0x74, 0x17, 0x0a, 0xf1, 0x9b, 0x14, + 0xae, 0x6e, 0x7f, 0x4f, 0xd2, 0x2c, 0xc1, 0x8c, 0xdb, 0xe2, 0xb9, 0xd7, 0x6a, 0x33, 0x6e, 0xcb, + 0x68, 0x61, 0xeb, 0xa8, 0x32, 0xb0, 0xf2, 0x2e, 0xbc, 0x82, 0x27, 0x59, 0x4f, 0x7b, 0xc9, 0x97, + 0x68, 0x42, 0xce, 0x78, 0x08, 0xaf, 0xc6, 0xab, 0xec, 0x7b, 0x6d, 0xf6, 0x1f, 0x9e, 0x0e, 0xa3, + 0x0a, 0x2b, 0x17, 0xe5, 0x90, 0x76, 0x07, 0x66, 0x5d, 0xaf, 0xcd, 0xb0, 0x5b, 0xd7, 0x94, 0xf7, + 0xd8, 0xa6, 0xbe, 0x6c, 0xd3, 0x1a, 0x8f, 0xae, 0xfc, 0x93, 0x85, 0xff, 0x71, 0x49, 0xf2, 0x95, + 0x06, 0xf2, 0x31, 0xf1, 0xc9, 0x86, 0x32, 0x5d, 0x65, 0x02, 0xfa, 0x66, 0x9a, 0x50, 0xc1, 0x68, + 0x6c, 0x3e, 0xfb, 0xeb, 0x87, 0x4d, 0xed, 0x8b, 0x5f, 0xff, 0xfc, 0x66, 0xa6, 0x48, 0x6e, 0x5a, + 0x4a, 0xbb, 0x92, 0x08, 0xdf, 0x6a, 0x30, 0x8f, 0x02, 0xa4, 0x34, 0xb5, 0x86, 0xa4, 0xd9, 0x48, + 0x11, 0x89, 0x30, 0x3b, 0x11, 0xcc, 0x06, 0x59, 0xbf, 0x14, 0xc6, 0x3a, 0xc2, 0x13, 0x18, 0x91, + 0x1f, 0x35, 0x20, 0x17, 0x7b, 0x86, 0x6c, 0x4f, 0xad, 0x7b, 0xb1, 0x27, 0xf5, 0x9d, 0xab, 0x25, + 0x5d, 0x81, 0x3b, 0xbc, 0x30, 0x75, 0xb7, 0x65, 0x1d, 0xb9, 0xad, 0x11, 0xf9, 0x52, 0x83, 0x39, + 0xf1, 0x8c, 0x93, 0xf5, 0xc9, 0x65, 0x13, 0x9e, 0xa1, 0x97, 0xa6, 0x07, 0x22, 0x53, 0x29, 0x62, + 0xba, 0x49, 0xf2, 0x4a, 0x26, 0xe1, 0x1a, 0xe4, 0x7b, 0x0d, 0x92, 0xef, 0xa5, 0x4f, 0xac, 0xc9, + 0x65, 0x94, 0xde, 0xa2, 0xdf, 0x4d, 0x9f, 0x80, 0x7c, 0x5b, 0x11, 0xdf, 0x6d, 0xf2, 0xba, 0x92, + 0xaf, 0xcb, 0x33, 0xeb, 0x61, 0xff, 0xfd, 0xac, 0xc1, 0xb2, 0xc2, 0x20, 0xc8, 0x4e, 0xca, 0xe2, + 0x09, 0x1b, 0xd2, 0xef, 0x5d, 0x31, 0x0b, 0xb9, 0xdf, 0x8a, 0xb8, 0xcb, 0xe4, 0xcd, 0x34, 0xdc, + 0xd6, 0xd1, 0xd8, 0xe2, 0x46, 0xe3, 0xeb, 0x9c, 0x8d, 0xbb, 0xcc, 0x84, 0x3b, 0xa4, 0xf0, 0xa7, + 0x09, 0x77, 0x48, 0x65, 0x59, 0x69, 0xce, 0x5d, 0xb8, 0xd7, 0xf8, 0xde, 0xe4, 0x54, 0xa6, 0x43, + 0xd4, 0x87, 0x79, 0x89, 0xc7, 0xe9, 0x5b, 0x57, 0xc8, 0x48, 0xbf, 0x8f, 0x82, 0x33, 0xbc, 0xe9, + 0xc2, 0x6c, 0x46, 0xe4, 0xa7, 0x88, 0x3b, 0xe1, 0x4f, 0x97, 0x73, 0xab, 0x0c, 0xf1, 0x72, 0x6e, + 0xa5, 0xf9, 0x19, 0xf7, 0x23, 0x6e, 0x93, 0xdc, 0x49, 0xc5, 0x2d, 0xbc, 0x76, 0x44, 0xbe, 0xd3, + 0x60, 0x31, 0xe6, 0x13, 0xe4, 0xce, 0xd4, 0xc7, 0x26, 0xe6, 0x4e, 0x7a, 0x39, 0x65, 0x74, 0xfa, + 0xfd, 0x95, 0x56, 0x3a, 0xb6, 0x9d, 0xe8, 0x3d, 0xb5, 0x1f, 0x3c, 0x3f, 0x2d, 0x68, 0x2f, 0x4f, + 0x0b, 0xda, 0x1f, 0xa7, 0x05, 0xed, 0xeb, 0xb3, 0x42, 0xe6, 0xe5, 0x59, 0x21, 0xf3, 0xdb, 0x59, + 0x21, 0xf3, 0xc9, 0x46, 0xc7, 0x0d, 0x0e, 0x07, 0x0d, 0xb3, 0xc9, 0xba, 0x52, 0x50, 0xfc, 0x29, + 0xfb, 0xad, 0xcf, 0xac, 0xa7, 0x42, 0x3d, 0x18, 0xf6, 0x1c, 0xbf, 0x31, 0xc7, 0xff, 0x27, 0xdb, + 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x49, 0x22, 0x49, 0xcc, 0xb2, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -977,6 +1073,8 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -1048,6 +1146,15 @@ func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccount return out, nil } +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { out := new(Bech32PrefixResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) @@ -1105,6 +1212,8 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -1142,6 +1251,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") } +func (*UnimplementedQueryServer) ModuleAccountByName(ctx context.Context, req *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} func (*UnimplementedQueryServer) Bech32Prefix(ctx context.Context, req *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") } @@ -1249,6 +1361,24 @@ func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bech32PrefixRequest) if err := dec(in); err != nil { @@ -1345,6 +1475,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ModuleAccounts", Handler: _Query_ModuleAccounts_Handler, }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, { MethodName: "Bech32Prefix", Handler: _Query_Bech32Prefix_Handler, @@ -1480,7 +1614,7 @@ func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1490,20 +1624,32 @@ func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Account != nil { + { + size, err := m.Account.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 *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1513,30 +1659,20 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) 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 *QueryAccountResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1546,32 +1682,30 @@ func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1581,12 +1715,12 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1631,6 +1765,71 @@ func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QueryModuleAccountByNameRequest) 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 *QueryModuleAccountByNameRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountByNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryModuleAccountByNameResponse) 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 *QueryModuleAccountByNameResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountByNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.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 *Bech32PrefixRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1983,40 +2182,40 @@ func (m *QueryAccountRequest) Size() (n int) { return n } -func (m *QueryModuleAccountsRequest) Size() (n int) { +func (m *QueryAccountResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } -func (m *QueryParamsResponse) Size() (n int) { +func (m *QueryParamsRequest) 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 *QueryAccountResponse) Size() (n int) { +func (m *QueryParamsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryParamsRequest) Size() (n int) { +func (m *QueryModuleAccountsRequest) Size() (n int) { if m == nil { return 0 } @@ -2040,6 +2239,32 @@ func (m *QueryModuleAccountsResponse) Size() (n int) { return n } +func (m *QueryModuleAccountByNameRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryModuleAccountByNameResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *Bech32PrefixRequest) Size() (n int) { if m == nil { return 0 @@ -2459,7 +2684,7 @@ func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2482,10 +2707,96 @@ func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var 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.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.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 *QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2592,7 +2903,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2615,15 +2926,65 @@ func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryModuleAccountsRequest: 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 *QueryModuleAccountsResponse) 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: QueryModuleAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2650,10 +3011,8 @@ func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Account == nil { - m.Account = &types.Any{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Accounts = append(m.Accounts, &types.Any{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2678,7 +3037,7 @@ func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryModuleAccountByNameRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2701,12 +3060,44 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryModuleAccountByNameRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2728,7 +3119,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryModuleAccountByNameResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2751,15 +3142,15 @@ func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryModuleAccountsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryModuleAccountByNameResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryModuleAccountByNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2786,8 +3177,10 @@ func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Accounts = append(m.Accounts, &types.Any{}) - if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index 5c1ff90d4753..2ba4a2871084 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -213,6 +213,60 @@ func local_request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime } +func request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.ModuleAccountByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.ModuleAccountByName(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Bech32PrefixRequest var metadata runtime.ServerMetadata @@ -514,6 +568,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ModuleAccountByName_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_ModuleAccountByName_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_ModuleAccountByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Bech32Prefix_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -747,6 +824,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ModuleAccountByName_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_ModuleAccountByName_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_ModuleAccountByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Bech32Prefix_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -841,6 +938,8 @@ var ( pattern_Query_ModuleAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "module_accounts"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ModuleAccountByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "module_accounts", "name"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Bech32Prefix_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "bech32"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AddressBytesToString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "bech32", "address_bytes"}, "", runtime.AssumeColonVerbOpt(false))) @@ -861,6 +960,8 @@ var ( forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage + forward_Query_ModuleAccountByName_0 = runtime.ForwardResponseMessage + forward_Query_Bech32Prefix_0 = runtime.ForwardResponseMessage forward_Query_AddressBytesToString_0 = runtime.ForwardResponseMessage From b0e0b3e5dc4a3177bad24eddaa5e630957644a4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Oct 2022 23:28:36 +0200 Subject: [PATCH 5/8] build(deps): Bump tailwindcss from 3.1.8 to 3.2.0 in /docs (#13615) * build(deps): Bump tailwindcss from 3.1.8 to 3.2.0 in /docs Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.1.8 to 3.2.0. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.1.8...v3.2.0) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * build(deps): Bump tailwindcss from 3.1.8 to 3.2.0 in /docs for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- docs/package-lock.json | 42 +++++++++++++++++++++--------------------- docs/package.json | 2 +- simapp/go.sum | 4 ++-- tests/go.sum | 4 ++-- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index fd4cfcca6175..85634fbdb355 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -21,7 +21,7 @@ "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", - "tailwindcss": "^3.1.8" + "tailwindcss": "^3.2.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.1.0" @@ -8943,11 +8943,11 @@ } }, "node_modules/postcss-nested": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", - "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", "dependencies": { - "postcss-selector-parser": "^6.0.6" + "postcss-selector-parser": "^6.0.10" }, "engines": { "node": ">=12.0" @@ -11157,9 +11157,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", - "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.0.tgz", + "integrity": "sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==", "dependencies": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -11167,18 +11167,18 @@ "detective": "^5.2.1", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "lilconfig": "^2.0.6", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.14", + "postcss": "^8.4.17", "postcss-import": "^14.1.0", "postcss-js": "^4.0.0", "postcss-load-config": "^3.1.4", - "postcss-nested": "5.0.6", + "postcss-nested": "6.0.0", "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", @@ -19140,11 +19140,11 @@ } }, "postcss-nested": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", - "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", "requires": { - "postcss-selector-parser": "^6.0.6" + "postcss-selector-parser": "^6.0.10" } }, "postcss-normalize-charset": { @@ -20770,9 +20770,9 @@ } }, "tailwindcss": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", - "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.0.tgz", + "integrity": "sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==", "requires": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -20780,18 +20780,18 @@ "detective": "^5.2.1", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "lilconfig": "^2.0.6", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.14", + "postcss": "^8.4.17", "postcss-import": "^14.1.0", "postcss-js": "^4.0.0", "postcss-load-config": "^3.1.4", - "postcss-nested": "5.0.6", + "postcss-nested": "6.0.0", "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", diff --git a/docs/package.json b/docs/package.json index f14b84becc48..ac8a04d211d0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -31,7 +31,7 @@ "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", - "tailwindcss": "^3.1.8" + "tailwindcss": "^3.2.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.1.0" diff --git a/simapp/go.sum b/simapp/go.sum index 7ee3572850cc..73e9779f9cea 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -612,16 +612,16 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d h1:ojbVlSwN0ZgOpE8jOnFQ6iNm247PwFTykE5qe9xITqw= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d/go.mod h1:8W5G7hGZRVlsdVjoP4lh/nKiL23VhQFJZrImu0uoBDY= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 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/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= diff --git a/tests/go.sum b/tests/go.sum index 4c99da67f992..7033ea35cda5 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -614,16 +614,16 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d h1:ojbVlSwN0ZgOpE8jOnFQ6iNm247PwFTykE5qe9xITqw= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d/go.mod h1:8W5G7hGZRVlsdVjoP4lh/nKiL23VhQFJZrImu0uoBDY= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 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/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= From c484a0dc0f5ca0facb843cd8b1369f0ee48222c1 Mon Sep 17 00:00:00 2001 From: Jim Larson <32469398+JimLarson@users.noreply.github.com> Date: Sat, 22 Oct 2022 17:52:06 -0700 Subject: [PATCH 6/8] docs: Textual ADR minor fixes (#13608) ## Description Refs: #11970 Minor fixups to architecture docs. No major semantic changes are intended. --- ### Author Checklist I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- docs/architecture/adr-050-sign-mode-textual-annex2.md | 8 ++++---- docs/architecture/adr-050-sign-mode-textual.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/architecture/adr-050-sign-mode-textual-annex2.md b/docs/architecture/adr-050-sign-mode-textual-annex2.md index ad0d5e6fd85f..d4037a50e4ba 100644 --- a/docs/architecture/adr-050-sign-mode-textual-annex2.md +++ b/docs/architecture/adr-050-sign-mode-textual-annex2.md @@ -16,7 +16,7 @@ This annex provides normative guidance on how devices should render a ## Context `SIGN_MODE_TEXTUAL` allows a legible version of a transaction to be signed -on a hardware security devices, such as a Ledger. Early versions of the +on a hardware security device, such as a Ledger. Early versions of the design rendered transactions directly to lines of ASCII text, but this proved awkward from its in-band signaling, and for the need to display Unicode text within the transaction. @@ -53,13 +53,13 @@ sequence, with user controls for going forward or backward a line. - Expert mode screens are only presented if the device is in expert mode. - Each line of the screen starts with a number of `>` characters equal -to the screen's indetation level, followed by a `+` character if this +to the screen's indentation level, followed by a `+` character if this isn't the first line of the screen, followed by a space if either a `>` or a `+` has been emitted, or if this header is followed by a `>`, `+`, or space. -- If the line ends with whitespace or an `@` character, and `@` character -is appended to the line. +- If the line ends with whitespace or an `@` character, an additional `@` +character is appended to the line. - The following ASCII control characters or backslash (`\`) are converted to a backslash followed by a letter code, in the manner of string literals diff --git a/docs/architecture/adr-050-sign-mode-textual.md b/docs/architecture/adr-050-sign-mode-textual.md index 5e769e5f0d93..b89ec2f7cf25 100644 --- a/docs/architecture/adr-050-sign-mode-textual.md +++ b/docs/architecture/adr-050-sign-mode-textual.md @@ -229,7 +229,7 @@ When this option is set on a `Msg`, a registered function will transform the `Ms The `` is a string convention chosen by the application developer and is used to identify the custom `Msg` renderer. For example, the documentation or specification of this custom algorithm can reference this identifier. This identifier CAN have a versioned suffix (e.g. `_v1`) to adapt for future changes (which would be consensus-breaking). We also recommend adding Protobuf comments to describe in human language the custom logic used. -Moreover, the renderer must provide 2 functions: one for formatting from Protobuf to string, and one for parsing string to Protobuf. These 2 functions are provided by the application developer. To satisfy point #1, these 2 functions MUST be bijective with each other. Bijectivity of these 2 functions will not be checked by the SDK at runtime. However, we strongly recommend the application developer to include a comprehensive suite in their app repo to test bijectivity, as to not introduce security bugs. +Moreover, the renderer must provide 2 functions: one for formatting from Protobuf to string, and one for parsing string to Protobuf. These 2 functions are provided by the application developer. To satisfy point #1, the parse function MUST be the inverse of the formatting function. This property will not be checked by the SDK at runtime. However, we strongly recommend the application developer to include a comprehensive suite in their app repo to test invertibility, as to not introduce security bugs. ### Require signing over the `TxBody` and `AuthInfo` raw bytes @@ -244,7 +244,7 @@ where: - `HEX` is the hexadecimal representation of the bytes, all in capital letters, no `0x` prefix, - and `len()` is encoded as a Big-Endian uint64. -This is to prevent transaction hash malleability. The point #1 about bijectivity assures that transaction `body` and `auth_info` values are not malleable, but the transaction hash still might be malleable with point #1 only, because the SIGN_MODE_TEXTUAL strings don't follow the byte ordering defined in `body_bytes` and `auth_info_bytes`. Without this hash, a malicious validator or exchange could intercept a transaction, modify its transaction hash _after_ the user signed it using SIGN_MODE_TEXTUAL (by tweaking the byte ordering inside `body_bytes` or `auth_info_bytes`), and then submit it to Tendermint. +This is to prevent transaction hash malleability. The point #1 about invertiblity assures that transaction `body` and `auth_info` values are not malleable, but the transaction hash still might be malleable with point #1 only, because the SIGN_MODE_TEXTUAL strings don't follow the byte ordering defined in `body_bytes` and `auth_info_bytes`. Without this hash, a malicious validator or exchange could intercept a transaction, modify its transaction hash _after_ the user signed it using SIGN_MODE_TEXTUAL (by tweaking the byte ordering inside `body_bytes` or `auth_info_bytes`), and then submit it to Tendermint. By including this hash in the SIGN_MODE_TEXTUAL signing payload, we keep the same level of guarantees as [SIGN_MODE_DIRECT](./adr-020-protobuf-transaction-encoding.md). From 4cf2911f166a407ab4410a4bc6fa977d1c41716a Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Sun, 23 Oct 2022 02:02:59 -0400 Subject: [PATCH 7/8] feat(core): add AppModule tag interface (#13607) --- core/appmodule/module.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 core/appmodule/module.go diff --git a/core/appmodule/module.go b/core/appmodule/module.go new file mode 100644 index 000000000000..70ba46b0b4ac --- /dev/null +++ b/core/appmodule/module.go @@ -0,0 +1,14 @@ +package appmodule + +import "cosmossdk.io/depinject" + +// AppModule is a tag interface for app module implementations to use as a basis +// for extension interfaces. It provides no functionality itself, but is the +// type that all valid app modules should provide so that they can be identified +// by other modules (usually via depinject) as app modules. +type AppModule interface { + depinject.OnePerModuleType + + // IsAppModule is a dummy method to tag a struct as implementing an AppModule. + IsAppModule() +} From 3b62a95ad0d981a59f719b6b2f48184fc12feb49 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 24 Oct 2022 12:55:58 +0200 Subject: [PATCH 8/8] ci: fix can't release cosmovisor (#13618) * ci: fix can't release cosmovisor * fix tests * update date * update zip --- .github/workflows/cosmovisor-release.yml | 2 +- tools/cosmovisor/CHANGELOG.md | 2 +- tools/cosmovisor/cmd/cosmovisor/help.go | 2 +- tools/cosmovisor/cmd/cosmovisor/help_test.go | 2 +- .../download/cosmovisor/genesis/bin/autod | 2 +- .../testdata/repo/chain2-zip_bin/autod | 4 ++-- .../testdata/repo/chain2-zip_bin/autod.zip | Bin 562 -> 565 bytes .../testdata/repo/ref_to_chain3-zip_dir.json | 2 +- tools/cosmovisor/upgrade_test.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cosmovisor-release.yml b/.github/workflows/cosmovisor-release.yml index 6160078140e3..5405ded49271 100644 --- a/.github/workflows/cosmovisor-release.yml +++ b/.github/workflows/cosmovisor-release.yml @@ -34,7 +34,7 @@ jobs: # stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125) version: v0.179.0 args: release --rm-dist --skip-validate - workdir: cosmovisor + workdir: tools/cosmovisor env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_CURRENT_TAG: cosmovisor/${{ env.RELEASE_VERSION }} diff --git a/tools/cosmovisor/CHANGELOG.md b/tools/cosmovisor/CHANGELOG.md index d5e0a9c81e5e..e4249406658b 100644 --- a/tools/cosmovisor/CHANGELOG.md +++ b/tools/cosmovisor/CHANGELOG.md @@ -36,7 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -## v1.4.0 2022-10-21 +## v1.4.0 2022-10-23 ### API Breaking Changes diff --git a/tools/cosmovisor/cmd/cosmovisor/help.go b/tools/cosmovisor/cmd/cosmovisor/help.go index cc4f38c50218..41a873d9fdd9 100644 --- a/tools/cosmovisor/cmd/cosmovisor/help.go +++ b/tools/cosmovisor/cmd/cosmovisor/help.go @@ -18,7 +18,7 @@ the proposal. Cosmovisor interprets that data to perform an update: switch a cur and restart the App. Configuration of Cosmovisor is done through environment variables, which are -documented in: https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md`, +documented in: https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor/README.md`, cosmovisor.EnvName, cosmovisor.EnvHome, ) } diff --git a/tools/cosmovisor/cmd/cosmovisor/help_test.go b/tools/cosmovisor/cmd/cosmovisor/help_test.go index 1b66b226cdfc..4b2075d6fef6 100644 --- a/tools/cosmovisor/cmd/cosmovisor/help_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/help_test.go @@ -92,7 +92,7 @@ func (s *HelpTestSuite) TestGetHelpText() { expectedPieces := []string{ "Cosmovisor", cosmovisor.EnvName, cosmovisor.EnvHome, - "https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md", + "https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor/README.md", } actual := GetHelpText() diff --git a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod index 89cb77365a14..5bb4777b4384 100755 --- a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod +++ b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod @@ -6,7 +6,7 @@ echo 'ERROR: UPGRADE "chain2" NEEDED at height: 49: zip_binary' # create upgrade info # this info contains directly information about binaries (in chain2->chain3 update we test with info containing a link to the file with an address for the new chain binary) -echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 +echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 sleep 0.1 echo Never should be printed!!! diff --git a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod index 5bc99c552123..06520737da9b 100755 --- a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod +++ b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod @@ -6,8 +6,8 @@ echo Args: $@ echo 'ERROR: UPGRADE "chain3" NEEDED at height: 936: ref_to_chain3-zip_dir.json module=main' # this update info doesn't contain binaries, instead it is a reference for further download instructions. -# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 -echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 +# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 +echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 sleep 1 echo 'Do not print' diff --git a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip index 68d33a538c5b54cf0df7344fcea72994610f0159..92c6486df1a362eeebb05c3a2fee9fcb12a13abf 100644 GIT binary patch literal 565 zcmWIWW@Zs#-~hr&3&KMgpkOZ(0|P6A0z+bHNq$Ob2rmP>NmFPt43}1LGcdBeU}j(d z6MHB5XFoO&IQssdNbu4Jx=RFer#bQN&bc|`-YuaQx&k59GAk#Vx=ES;b>3Hfys+v` zqJFi|rE25P)y-<^zfQ8w&6$>%%K0zqF;k3_@XFTm>!lIR5uZ*+a$iCDv3r8eDMax0m`fuWXUBOU}7v&9PgSeV5zAeS2eUoZj^BreIdIN0&jU@=mRmnpJEpg7#srvfp`$7EO-*vi{bVuUGvmBQ#In zS?ct8_TM;obYh`nd;Jwxaf|bIi~-*4937T*nU#zT44@bb@MdHZ lVMfFzvK%NjVc=~eh(%P~26(fwffO?WVK9(B1GI{P0RSfw*Bbx; literal 562 zcmWIWW@Zs#-~hs388br|pkN~t0|P6A0z+bHNq$Ob2rmOWM`KzN43}1LGcdBeU}j(d z6I&-aW=k6iw7&nXt+pvKdV{XebO&*vtXE67n@JQIOQe=xo3!?-&ZV3?YCra;Uz;sc z{bHf|!b*SR`_d*mFZt`eNZHJz?fv1dl=uU-SsuE3cC0%rbtK`@{J{95wOR?kbZ0v# zxFuvu_;Iw`8Ag2WNm$S?XJ`7vcCL$i$BmkKyk!?>-K+kfCv&{4a_7xIw?sbt_>jCg zYWjjziT{EQp5GKRJ$u44vAg$*7~`jJKYAhS_!jBd;)l1d>gn-yGHnU@F84kv@RQGn z8@pI)!=)FNEL2><8GJ%gi_4~E&yk`TX-evD!Oh7N%+qEx2|Bl42oQOqp}A;}J*$7S z@0*S5Zv=X9&ooi13_ZAIMOQzEvFW7MPAAf{90Wd=uC{xY7piD})AfJ!>}~u0Dz&cN zbS747%RTFDe=jdu6c#=u%Ip1co2%}!XFd5HkKfwtEn=FS#F<@kr0>gp@vWiHH(Na~ z;J=*uP5;IJxo@0Q10p|l$j0oyy!Pd%@?9^Op5K%X@Mh;w>ag)IV`N|eMOT0~Ba;X- jA}W#PKv4+;e;Yw8q9QiHo0Scum=Oqrf%HkBRSXOO3+LN) diff --git a/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json index 7baa216b9633..8e18b9a9c262 100644 --- a/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json +++ b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json @@ -1,5 +1,5 @@ { "binaries": { - "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" + "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" } } diff --git a/tools/cosmovisor/upgrade_test.go b/tools/cosmovisor/upgrade_test.go index 7187ce7bd5ab..9bac7b013410 100644 --- a/tools/cosmovisor/upgrade_test.go +++ b/tools/cosmovisor/upgrade_test.go @@ -155,7 +155,7 @@ func (s *upgradeTestSuite) TestGetDownloadURL() { }, "follow reference": { info: ref, - url: "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", + url: "https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", }, "malformated reference target": { info: badref,